[jQuery] callback executed before effect ended

2008-08-27 Thread Aljosa Mohorovic
t = $("#link_"+id); next.addClass('current'); current.fadeOut('slow', function(){ next.fadeIn('slow'); }); return false; }); - problem is that next element appears while current element is still fading out, any idea what i'm doing wrong? Aljosa Mohorovic

[jQuery] Re: $.getJSON() problem

2007-11-21 Thread Aljosa Mohorovic
thanks, i had an extra comma. i had no problem with decimal value, replacing comma with dot was not a problem but what would you do if you need to output decimal number with comma instead dot? i'm asking because croatia (country in europe) has decimal comma, not dot. Aljosa

[jQuery] $.getJSON() problem

2007-11-19 Thread Aljosa Mohorovic
i have a problem with $.getJSON(), nothing is logged in firebug console although i can see that correct data is returned in response (in firebug) for code: >>> $.getJSON(url, function(data){ console.log(data); }); <<< same code, but using $.get instead $.getJSON works as expected: >>> $.get(u

[jQuery] catch events after dynamic insert/json

2007-09-26 Thread Aljosa Mohorovic
i have: $("a.delete").click(function() { alert("test") }); after i fetch some json data and append new html: // on json load $("div.items).append("test"); click events on items inserted after json data is loaded are not working, how can i tell jquery to inspect DOM again and attach actions on ne

[jQuery] adding custom attr on html elements?

2007-09-19 Thread Aljosa Mohorovic
if i have test $("a.test").click(function() { arg1 = $(this).attr('arg1'); arg2 = $(this).attr('arg2'); // code using args }); is this acceptable way of using attr or should i avoid this?

[jQuery] jquery books

2007-08-22 Thread Aljosa Mohorovic
i'm using jquery for most of javascript related things and i finally decided that i should do it better 8-) my plan is to improve my knowledge so i'm looking for some advanced books and i found: Learning jQuery: Better Interaction Design and Web Development with Simple JavaScript Techniques by Ka

[jQuery] val() on select box

2007-04-18 Thread Aljosa Mohorovic
i have a select box with name "brands" and i can access currently selected option using $('[EMAIL PROTECTED]').val() will val() always return currently selected option? Aljosa Mohorovic