[jQuery] Problem with $(document).ready in =IE7 only

2009-11-23 Thread JD
Hello everyone,

I'm trying to figure out this weird error I'm seeing. I have a simple
script that, after the document is ready, I want to change a CSS
attribute from display:none to display:block and then load the
jquery inifinite carousel plugin:

script type=text/javascript language=javascript
!--
$(document).ready(function() {
$(#carousel).css({
'display' : 'block'
});
});

$(function(){
$('#carousel').infiniteCarousel({
transitionSpeed : 500,
displayTime : 1,
textholderHeight : .15,
displayProgressBar : 0,
displayThumbnails: 0,
 });
});
--
/script

This works fine in Safari, Firefox and IE 8. But in IE 7 (and I assume
lower but I'm not testing for it because it's not a requirement), I
get an object expected error on the last }); in the first function.
I've googled around and changed up the script include so it's set to
language instead of type, I've moved stuff around, made sure that my
JS include path is correct, but I'm stumped.

For reference, here's how I include my JS. I know I can use the google
inclusion code, but when I have that IE7 throws another hissy about
variables not being defined:

script type=text/javascript language=javascript src=http://
ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js/script
script type=text/javascript language=javascript src=http://
ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js/
script
link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/
smoothness/jquery-ui.css type=text/css rel=stylesheet

So I'm 99.9% positive it's not loading the js fast enough for the
function, but I'm not sure how to fix it.



[jQuery] Cluetip persist when mouse over hover

2009-10-20 Thread JD

I need the tooltip to persist when the mouse is over either the link
or over the tooltip.  I saw this functionality being displayed by
aCoolTip and it seemed to be the default.

The tooltip needs to be activated on hover and I also want sticky to
be false.

Is there any combination of settings that will give me this behavior?
Thanks!


[jQuery] window close function _

2009-09-29 Thread -JD-

Al cerrar una pagina necesito llamar a otra para poder hacer algunos
cambios en mi DB. Intenté con esto:
$(window).unload( function () { alert(Bye 
now!); } );
pero solo quiero q haga al momento de cerrar no de recargar la pagina.
Eh estado buscando scripts pero no encuentro, ayuda! =D


[jQuery] JQuery XML and FusionCharts

2009-07-17 Thread JD

Hi guys,
I have an AJAX request which passes back some xml data, at the
moment I am only interested in one of the nodes, so I do
var onlyChartData = jData.find (chart);

This appears to work fine as I can
$(xmldiv).append (onlyChartData); and it's appends it to the div.
However I cannot alert the data from onlyChartData, using .text or
anything. I'm using FF.

This leads me on to my next problem.
I am using FusionCharts, and for some reason whatever when I call
setDataXML or UpdateChartXML on a fusion Chart I am getting invalid
data. I have checked the xml from the div and it is fine if loaded
seperately by Fusion Charts.

Any ideas would be helpful.

Thanks

JD


[jQuery] Re: URL generated by Ajax

2009-07-16 Thread JD

thanks for this it does the job nicely.

Regards

JD

On Jul 15, 1:59 pm, Peter Edwards p...@bjorsq.net wrote:
 Hi JD,

 In your success callback, you have access toajaxoptions through the
 this keyword, so you can get the fullURLby doing this within the
 success callback:

 alert(this.url+'?'+this.data);

 peter

 on 15/07/2009 13:30 Mean Mike said::

  if you just need to see what your posting and whaturlits going too
  why not just view it in httpfox ?

  On Jul 15, 6:54 am, JD odonovan.jo...@gmail.com wrote:

  Hi Guys,
      This is probably a very simple question, i'm new to JQuery but I
  can't find the solution.
  I create an AjaxReqest with aurland some post data. Is there any way
  that i can alert out theURLwhich is thengeneratedin the call.

  Example
     url:www.yahoo.com/login
     postdata: username=user password=pass
     Creates something along the lines 
  ofwww.yahoo.com/login?username=userpassword=pass

  Obviously the real calls are much more complex.

  I have read somewhere that the argument to the onSuccess function
  should expose a .urlfunction but this doesn't seem to work.

  Any help is appreciated.

  Thanks

  JD


[jQuery] Re: URL generated by Ajax

2009-07-16 Thread JD

Yes i might try this as well, thanks

On Jul 15, 1:30 pm, Mean Mike mcgra...@gmail.com wrote:
 if you just need to see what your posting and whaturlits going too
 why not just view it in httpfox ?

 On Jul 15, 6:54 am, JD odonovan.jo...@gmail.com wrote:

  Hi Guys,
      This is probably a very simple question, i'm new to JQuery but I
  can't find the solution.
  I create an AjaxReqest with aurland some post data. Is there any way
  that i can alert out theURLwhich is thengeneratedin the call.

  Example
     url:www.yahoo.com/login
     postdata: username=user password=pass
     Creates something along the lines 
  ofwww.yahoo.com/login?username=userpassword=pass

  Obviously the real calls are much more complex.

  I have read somewhere that the argument to the onSuccess function
  should expose a .urlfunction but this doesn't seem to work.

  Any help is appreciated.

  Thanks

  JD


[jQuery] URL generated by Ajax

2009-07-15 Thread JD

Hi Guys,
This is probably a very simple question, i'm new to JQuery but I
can't find the solution.
I create an AjaxReqest with a url and some post data. Is there any way
that i can alert out the URL which is then generated in the call.

Example
   url: www.yahoo.com/login
   postdata: username=user password=pass
   Creates something along the lines of 
www.yahoo.com/login?username=userpassword=pass

Obviously the real calls are much more complex.

I have read somewhere that the argument to the onSuccess function
should expose a .url function but this doesn't seem to work.

Any help is appreciated.

Thanks

JD


[jQuery] jCarousel advance issue - final item only shows half

2009-06-24 Thread JD

http://deweyresearch.oclc.org/pages/035262491.html

On the above page, we have two jCarousels that are advancing one-at-a-
time until you get to the final item. (22 clicks for carousel at top
of page, 16 clicks for the Related Works carousel half way down the
page. Try this one, it's easier to see the problem.)

The final item in the list is only half shown or less. From there, all
things only advance or go back a-half-at-a time. (Or less and yes, I
know a good deal of the images are blanks, that is another issue :)

We've been working with this for some time and I honestly have no idea
why it's happening.
You can get to the JS at: http://deweyresearch.oclc.org/pages/js/pages.js

I can tell you the problem is less consistent with the top carousel,
where only an image is displayed and only one-at-at-time. If the list
is small, like on this page (http://deweyresearch.oclc.org/pages/
029791864.html) the top carousel forwards and advances fine.

Any ideas?
Any one have the same issue?

I can confirm the issue in FF3, IE7, Chrome, Opera and Safari on
Windows XP.
So it's a pretty consistent problem.

Please help.
Thanks
JD


[jQuery] JCarousel Dynamic source - Overwrite problem

2009-04-09 Thread JD

Hi,

I need a bit of help.
I am using JCarousel.

I need 1 Carousel on my page, but I want to be able to change the
source of the data going to the carousel based on what the user
selects.

For example - set of images and text that is for Paris, one for Rome
and one for Hong Kong... the user selects which set to see and the
proper set loads in the carousel.

I have the carousel working.
I have the different set of images in different arrays.

I have the links set.. .but what happens is the new data set
blinks in place for a second and then the orignal (on load set) pops
back into place.

Clearly some type of reload is happening.

No idea how to fix this.

(Sorry my example code is behind a firewall, so can't show it.

Please help.

thanks
JD


[jQuery] JCarousel Circular - Start Over Problem

2009-04-09 Thread JD

I have a page with one JCarousel on it.
I need to be able to switch between different data sources for the
single display carousel.

I have it almost working - however when I execute... it loops around
to the default start state and doesn't keep the new data on
displayit blinks past though.

I really need some help.

Here is the code;

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en 
head
meta content=text/html; charset=UTF-8 http-equiv=Content-Type /
titleCirle/title

!-- JQUERY --
script type=text/javascript src=http://jquery.com/src/jquery-
latest.js/script
script type=text/javascript src=scripts/jquery.jcarousel.js/
script

link rel=stylesheet type=text/css href=css/
jquery.jcarousel.css


link type=text/css rel=stylesheet href=css/carousel.css /


script type=text/javascript

var carousel1_itemList = [
{url: 'images/thumbs/caterpillar.jpg', title: 'The Very Hungry
Caterpillar', Auth: 'Eric Carle', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/peppers.jpg', title: 'Sgt. Peppers Lonely
Hearts Club Band', Auth: 'Beatles', formaturl:'images/formats/
musiconcd.gif', format:'CD'},
{url: 'images/thumbs/postal.jpg', title: 'Going Postal', Auth:
'Terry Pratchett', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/blank.jpg', title: 'Little Women', Auth:
'Louisa may Alcott', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/potter.jpg', title: 'Harry Potter', Auth: 'JK
Rowling', formaturl:'images/formats/DVD.gif', format:'DVD'},
{url: 'images/thumbs/rivals.jpg', title: 'Team of Rivals', Auth:
'Doris Kearns Goodwin', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/rockband.jpg', title: 'Rock Band', Auth:
'Electronic Arts', formaturl:'images/formats/videogame.gif',
format:'Video Game'},
{url: 'images/thumbs/stats.jpg', title: 'Business Stats', Auth:
'Leonard J Kazmier...', formaturl:'images/formats/book.gif',
format:'book'},
];



var carousel2_itemList = [
{url: 'images/thumbs/blank.jpg', title: '222 Little Women', Auth:
'Louisa may Alcott', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/potter.jpg', title: '222 Harry Potter', Auth:
'JK Rowling', formaturl:'images/formats/DVD.gif', format:'DVD'},
{url: 'images/thumbs/rivals.jpg', title: '222 Team of Rivals',
Auth: 'Doris Kearns Goodwin', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/rockband.jpg', title: '222 Rock Band', Auth:
'Electronic Arts', formaturl:'images/formats/videogame.gif',
format:'Video Game'},
{url: 'images/thumbs/stats.jpg', title: '222 Business Stats',
Auth: 'Leonard J Kazmier...', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/caterpillar.jpg', title: '222 The Very Hungry
Caterpillar', Auth: 'Eric Carle', formaturl:'images/formats/book.gif',
format:'book'},
{url: 'images/thumbs/peppers.jpg', title: ' 222 Sgt. Peppers
Lonely Hearts Club Band', Auth: 'Beatles', formaturl:'images/formats/
musiconcd.gif', format:'CD'},
{url: 'images/thumbs/postal.jpg', title: '222 Going Postal', Auth:
'Terry Pratchett', formaturl:'images/formats/book.gif',
format:'book'},

];

//var carousel_itemList;


function carousel_itemVisibleInCallback(carousel, item, i, state, evt)
{
// The index() method calculates the index from a
// given index who is out of the actual item range.
var idx = carousel.index(i, carousel_itemList.length);
carousel.add(i, carousel_getItemHTML(carousel_itemList[idx - 1]));
};
function carousel_itemVisibleOutCallback(carousel, item, i, state,
evt)
{
carousel.remove(i);
};

/**
 * Item html creation helper.
 */
function carousel_getItemHTML(item)
{

return 'div class=relatedWork-itema href=img src=' +
item.url + ' alt=' + item.title + ' //ah5 class=relatedWork-
Titlea href=' + item.title + '/a/h5 h5 class=relatedWork-
Authby '+ item.Auth + '/h5 h5 class=relatedWork-Formimg
src=' + item.formaturl + '/'+ item.format +'/h5 /div';
};

function drawCarousel(source){
//alert(source);
if (source == '1') {
carousel_itemList = carousel1_itemList;
}
else
carousel_itemList = carousel2_itemList;


jQuery('#carousel1').jcarousel({
visible:4,
scroll:2,
wrap: 'circular',
itemVisibleInCallback: {onBeforeAnimation:
carousel_itemVisibleInCallback},
itemVisibleOutCallback: {onAfterAnimation:
carousel_itemVisibleOutCallback},


});

}


jQuery(document).ready(function() {
drawCarousel('1');

$('#carousel1-on').click(function(event) {
drawCarousel('1');

});

$('#carousel2-on').click(function(event) {
drawCarousel('2');

});


});


/script

/head

body

a href= id=carousel1-onCarousel 1/a 

[jQuery] Tabs not working in IE, fine in FF

2008-11-12 Thread JD

I have set up a tabbed section for different parts of my portfolio. It
works great in Firefox, no problems, but when I try it in IE 7 it
doesn't work at all. I'm a noob when it comes to JavaScript/jQuery
(trying to learn though). Any ideas as to why would be appreciated.

Check this out to see what I've got: http://413creativemedia.com/tab.html.

Thanks in advance for the help.


[jQuery] Re: Tabs not working in IE, fine in FF

2008-11-12 Thread JD

I've done some looking at it looks like my var tabs = [ ]; doesn't
return anything in IE, but it does in FF.  I get an array on an alert
in FF, but get a blank alert on IE.  Any ideas?  I've left the alert
in for now.

Thanks.

On Nov 12, 12:50 pm, JD [EMAIL PROTECTED] wrote:
 I have set up a tabbed section for different parts of my portfolio. It
 works great in Firefox, no problems, but when I try it in IE 7 it
 doesn't work at all. I'm a noob when it comes to JavaScript/jQuery
 (trying to learn though). Any ideas as to why would be appreciated.

 Check this out to see what I've got:http://413creativemedia.com/tab.html.

 Thanks in advance for the help.


[jQuery] Re: Tabs not working in IE, fine in FF

2008-11-12 Thread JD

Ok, I've done some more debugging. This is what I have:

$(function () {
var tabs = [];
var tabContainers = [];
var tabContents = $('div.tabs  div');
tabContents.hide().filter('#start').show();
tabContents.filter('div.tabs_nav_div').show();
$('ul.tabNavigation a').each(function () {
 alert('+this.pathname+' == 
'+window.location.pathname
+'); // This Alert for debugging
if (this.pathname == 
window.location.pathname) {
tabs.push(this);

tabContainers.push($(this.hash).get(0));
}
});
$(tabs).click(function () {
// hide all tabs
$('#start').hide();

$(tabContainers).hide().filter(this.hash).show();

// set up the selected class
$(tabs).removeClass('selected');
$(this).addClass('selected');

return false;
});
});


When I compared the this.pathname == window.location.pathname in
firefox they return the same value '/tabs.html', but in IE
this.pathname returns 'tabs.html' and window.location.pathname returns
'/tabs.html'

Any ideas for a fix?

Thanks.

On Nov 12, 2:16 pm, JD [EMAIL PROTECTED] wrote:
 I've done some looking at it looks like my var tabs = [ ]; doesn't
 return anything in IE, but it does in FF.  I get an array on an alert
 in FF, but get a blank alert on IE.  Any ideas?  I've left the alert
 in for now.

 Thanks.

 On Nov 12, 12:50 pm, JD [EMAIL PROTECTED] wrote:

  I have set up a tabbed section for different parts of my portfolio. It
  works great in Firefox, no problems, but when I try it in IE 7 it
  doesn't work at all. I'm a noob when it comes to JavaScript/jQuery
  (trying to learn though). Any ideas as to why would be appreciated.

  Check this out to see what I've got:http://413creativemedia.com/tab.html.

  Thanks in advance for the help.


[jQuery] Tabs problem in IE

2008-11-12 Thread JD

I have set up a tabbed section for different parts of my portfolio. It
works great in Firefox, no problems, but when I try it in IE (I tired
it in 7) it doesn't work at all. I'm a noob when it comes to
JavaScript/jQuery (trying to learn though). Any ideas as to why would
be appreciated.

Check this out to see what I've got: http://413creativemedia.com/tab.html.

Thanks in advance for the help.


[jQuery] Re: Autocomplete - every item shown regardless of letter typed

2008-09-03 Thread JD

Here is a test: http://aasenboligdesign.no/test/test.htm

JD

On 3 Sep, 15:43, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Okay. Can you post a testpage?

 Jörn

 On Wed, Sep 3, 2008 at 1:13 PM, JD [EMAIL PROTECTED] wrote:

  Hi again!

  hehe, it was just a typo from me when I pasted the code... The above
  code should be correct.

  Anyhow, I get all the data from JSON, but if I type D, every single
  item from the file shows in the autocomplete-box.

  Strange... But apart from this obvious error, it works great :-)

  On 3 Sep, 12:59, Jörn Zaefferer [EMAIL PROTECTED]
  wrote:
  Looks like a typo in your parse implementation:  value: row.aname,
  should be  value: row.name,

  Jörn

  On Wed, Sep 3, 2008 at 8:32 AM, foxtrot [EMAIL PROTECTED] wrote:

   Oops, sorry aboute the missing code

   $(document).ready(function(){
  $(#client).autocomplete(data.json, {
  parse: function(data) {
  return $.map(eval(data), function(row) {
  customers = data;
  return {
  data: row,
  value: row.aname,
  result: row.name
  }
  });
  },
  minChars: 2,
  width: 263,
  formatItem: function(item){
  return item.name;
  }
  })
   });

   the html is just a input-field, and the json have this structure:

   {
  customers:[
  {
  name: A,
project:[
  {name: project1},
  {name: project2},
  {name: project3}
  ]
  },
  {
  name: B,
project:[
  {name: project1},
  {name: project2},
  {name: project3},
  {name: project4},
  {name: project5}
  ]
  },
  {
  name: C,
project:[
  {name: project1},
  {name: project2}
  ]
  }
  ]
   }

   On 3 Sep, 00:44, MorningZ [EMAIL PROTECTED] wrote:
   What can cause this?

   that would be your code...  but where and when and how is unknown with
   what little you provide


[jQuery] Dynamically reference jQuery and delay execution until it is loaded?

2008-06-24 Thread JD

Hi All,

I am struggling to test if a jQuery reference exists yet on a page,
and if it does continue loading my jQuery plugins.  However, if it
does not, I wish to add the jQuery reference, and continue loading my
jQuery plugins only after the jQuery script has loaded.

Below is a snippet of what I've tried (which does not work).  This
code is in the body tag of my page, and my specific problem is
detecting if a page has already loaded jQuery into the header.
Thanks!

body
div id=global_menu
  script language=JavaScript type=text/javascript
if (!jQuery)
{
//alert(jQuery NOT loaded);
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'jquery-1.2.6.min.js';
document.getElementsByTagName('head')[0].appendChild(script);
}
  /script
  !-- many other jQuery plugins are referenced here, too --
  script type=text/javascript src=http://www.elon.edu/e-net/
Scripts/menu/jquery.jdMenu.js /
 !-- menu source removed for brevity  --
/div
/body