[jQuery] Event Bubbling

2009-10-23 Thread Jaggi
Hi, trying to organise some code on a large project i'm doing which changes alot of code around the page with submit forms. As jQuery doesn't have a live support for submit elements i thought i'd try my hand at event bubbling. It works nicely in firefox but isn't working at all in ie so i thought

[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Jaggi
I had this problem recently but the only way i managed to get around it was to do it via the custom caller. So for you you'd do: $("input[name='emailAddress.email']").rules("add", { equalTo: "#emailAddress.email" }); On Oct 15, 12:36 pm, ade wrote: > HI > > Wonde

[jQuery] Re: (validate) equalTo with complex names

2009-10-15 Thread Jaggi
oOps thinks that wrong: $("input[name='emailAddress.emailRepeated']").rules("add", { equalTo: "#emailAddress.email" }); i think you get the idea though. On Oct 15, 2:07 pm, Jaggi wrote: > I had this problem recently bu

[jQuery] Limit nextAll

2009-08-28 Thread Jaggi
Basically i'm going through a table, i've used closest to get the parent element which is a tr then i can use next() to get the next one or nextAll() to get all the next ones however i just want to get the next two elements so is there a way to limit nextAll() to only return the next two matches r

[jQuery] Re: Live function being weird

2009-08-05 Thread Jaggi
ort the following event types: submit, change,   > focus, blur, mouseenter, and mouseleave. > > --Karl > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Aug 5, 2009, at 4:44 AM, Jaggi wrote: > > > > > I have two snippets of c

[jQuery] Live function being weird

2009-08-05 Thread Jaggi
I have two snippets of code: This one doesn't work $("form[name='edit']").live('click', function() { return false; }); This one does: $("form[name='edit']").click( function() { return false; }); I'm not sure why this is though, are attribute filters not supported with the live

[jQuery] Re: Get this in ajax

2009-08-05 Thread Jaggi
#x27;), >                 data: str, >                 beforeSend: function() { > >                 }, >                 success: function(data){ > >                         // use variable here >                         console.log($this); > >                 }, >                 error: function(xhr, status, erro

[jQuery] Get this in ajax

2009-08-04 Thread Jaggi
I'm using a ajax function but wish to return $(this) inside the success function but can't seem to get it to work, can some one tell me if its possible. If you look inside the success function i'm trying to get $(this) from the click function. $('.del').live('click', function() { var str

[jQuery] Re: NS_ERROR_DOM_BAD_URI with javascript bookmarklet and local path

2009-06-04 Thread Thomas Jaggi
Sorry, in Windows XP it only works when visiting local HTML files. On "real" websites I'm having the same problem. But why is it working using any webserver to host the script? I thought this was cross-domain all the same...

[jQuery] NS_ERROR_DOM_BAD_URI with javascript bookmarklet and local path

2009-06-04 Thread Thomas Jaggi
I wrote a script to show a grid overlay using a javascript bookmarklet. Now OS X throws an error (NS_ERROR_DOM_BAD_URI) when I try to load the script from a local path (file:///xy). Windows XP (in Parallels) doesn't have this problem. Loading it from a webserver works on OS X, too. Is this relate

[jQuery] Re: custom error messages

2009-03-12 Thread Jaggi
ult > messages display? If not, something else is the issue. > > On Mar 10, 2:51 am, Jaggi wrote: > > > been bashing my head with this one all day and can't seem to get it to > > display mycustomerror messages, any help would be great. > > > $(

[jQuery] Re: live() not working in IE8?

2009-03-11 Thread Jaggi
Yea the exact same thing happened to me although i think it works for click events. I had the same problem in ie7 too though. i just decided to use the old way of event bubbling to get around although the jquery lot did say they know it has issues. On Mar 11, 2:19 pm, Todd Rafferty wrote: > I ha

[jQuery] [validate] custom error messages

2009-03-10 Thread Jaggi
been bashing my head with this one all day and can't seem to get it to display my custom error messages, any help would be great. $("#offer").validate({ messages: { seasons: { required: 'Please select at least one season', mi

[jQuery] Re: alternate color row starting from a point

2009-02-27 Thread Thomas Jaggi
Sorry, that's above my abilities... Anyone else?

[jQuery] Re: alternate color row starting from a point

2009-02-27 Thread Thomas Jaggi
This should do it: $('tr:not(.className)').css({'background':'red'});

[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-25 Thread Thomas Jaggi
Well, it looks like indexOf() (or probably better search()) is ok since I just have to check a string for another one (e.g. is "2008" contained in the date value).

[jQuery] Re: Positioning inside div

2009-02-22 Thread Thomas Jaggi
They should have "position:absolute" instead if "position:relative". Relative means relative to the "normal" position. In this case you would have to set negative values for top/left to achieve an overlapping. Petar schrieb: > I'm trying to create and place several elements inside an empty >

[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-22 Thread Thomas Jaggi
(I didn't write the filter stuff yet...)

[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-22 Thread Thomas Jaggi
p/comp.lang.javascript/browse_thread/thr... > > What's your solution? > > On Feb 21, 4:24 pm, Thomas Jaggi wrote: > > > Great, that's it. Thanks a lot! > > > The indexOf is just an example. The options are actually some kind of > > filters and I want to check ea

[jQuery] Re: Stringing functions within a click event

2009-02-21 Thread Thomas Jaggi
be a conflict when you end up with 2 objects > with id1? > > Thanks > > paul > > On Feb 21, 2:29 pm, Thomas Jaggi wrote: > > > You could use the callback function (http://docs.jquery.com/Effects/ > > animate#paramsdurationeasingcallback). > > > $(&q

[jQuery] Re: Stringing functions within a click event

2009-02-21 Thread Thomas Jaggi
numbered form > 0 to 8, will there not be a conflict when you end up with 2 objects > with id1? > > Thanks > > paul > > On Feb 21, 2:29 pm, Thomas Jaggi wrote: > > > You could use the callback function (http://docs.jquery.com/Effects/ > > animate#par

[jQuery] Re: Ajax tabs in non JavaScript browsers

2009-02-21 Thread Thomas Jaggi
You have to solve this on the server side. If you put a normal link on the tab you can deliver an appropriate site on reloading. On 21 Feb., 13:26, Playtime wrote: > Dear all, > > I'm new to jquery and am just started to use the Ajax tabs in a site I > am building. However I do notice that if

[jQuery] Re: Stringing functions within a click event

2009-02-21 Thread Thomas Jaggi
You could use the callback function (http://docs.jquery.com/Effects/ animate#paramsdurationeasingcallback). $("#right").click(function(){ $("#i1").animate({width: '98px', "left": "+=86px"}, 1500, function (){ var id = $(this).attr('id').split('i')[1]; id = id -1; $(thi

[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-21 Thread Thomas Jaggi
Great, that's it. Thanks a lot! The indexOf is just an example. The options are actually some kind of filters and I want to check each item against each filter. Depending on the filter It could be indexOf. On 21 Feb., 14:44, Mike wrote: > > What is "key"?  That's not in either one of your dat

[jQuery] Re: Loop through JSON data and check for each option specified

2009-02-21 Thread Thomas Jaggi
Sorry, I mean "if (item.key.indexOf(val) != -1) {". But anyway, any ideas? I know my approach probably makes no sense at all...

[jQuery] Loop through JSON data and check for each option specified

2009-02-21 Thread Thomas Jaggi
Let's say I have on object with my options: options = jQuery.extend({ title: 'xy', date: 'xy' }, opts); And some JSON data: ({ "items": [ { "title": "IMGP3817", "date": "2008-10-18T10:35:17-08:00" }, { "title"

[jQuery] Re: How to loop through JSON data

2009-02-21 Thread Thomas Jaggi
Your Loop should probably look like this: $.each(results, function(key,val) { event += '' + val.title + ' ' + val.style +  '<\/div>'; }); On 21 Feb., 12:51, newkid85 wrote: > If I have JSON data like this: > > { "9": { "title": "Event 1", "style": "rock" }, "11": { "title": > "Event

[jQuery] Re: How to get the CSS definitions of a class not existing in the DOM

2009-02-10 Thread Thomas Jaggi
Sorry, I just found this thread: http://groups.google.com/group/jquery-en/browse_thread/thread/7cbc9fb45f7dc133/578d5407199aaf31

[jQuery] How to get the CSS definitions of a class not existing in the DOM

2009-02-10 Thread Thomas Jaggi
Let's say I have a CSS class for each of two possible states of an element. Now I want to animate from state X (".state-x {width:100%}") to state Y "(.state-y {width:50%}"). Is it possible to get the CSS definitions of ".state-y"? I suppose "$('.state-y').css('width')" doesn't work when there is

[jQuery] Cycle-Plugin: Add list-item after enabling cycle

2008-06-23 Thread Thomas Jaggi
Does anybody know how to enable the Cycle again after adding a list- item ("$('hello<\/li>').appendTo('#cycle');")? When just enabling it again like "jQuery('#cycle').cycle({...});" the new item and the first one are set to "display:list-item" at the same time...

[jQuery] Re: Sticky (scrolling) element

2008-04-06 Thread Thomas Jaggi
Hi spectrus Here you can see what I mean: http://view-source.de/ext/larepublique/slider-final/ Seems to work now. There is just a problem in IE6: As soon as there are any background- images, it's not really smooth any more... But same problem with the initial version. Probably that's because of

[jQuery] Sticky (scrolling) element

2008-04-05 Thread Thomas Jaggi
Hi there I have a scrolling box here: http://backflip.info/test/ Everything works fine except for two things: - I'd like the box to start scrolling not until "arriving" at the top of the page. Now there is always the initial margin. Is this possible with the ui.slider I'm using? - When the box i

[jQuery] Thickbox: Safari iFrame Cache

2007-07-08 Thread Thomas Jaggi
If I have several links to a thickbox-iFrame on my site, after reloading the site Safari always shows the same site in the iFrame (the one I last opened before reloading). The same problem appears if I have just one link but change it after having clicked once. After successfully reloading it ope

[jQuery] Re: Zebra table with hidden rows

2007-07-05 Thread Thomas Jaggi
This is not tested, but something like this might do it: $("table.xy tr:visible").each(function(index) { if (index %2 == 1) { $(this).addClass("odd"); } }); It's perfect, thank you!

[jQuery] Re: Multiple-select-box: set multiple to false

2007-07-05 Thread Thomas Jaggi
Are you sure you're not getting an error somewhere in the execution path? I've never tried toggling a select element between a multiple select and a single select. It seems it just doesn't work in Safari if the .hide()-stuff is before the multiple = false. Well, whatever. Quite frankly, this

[jQuery] Re: Multiple-select-box: set multiple to false

2007-07-05 Thread Thomas Jaggi
Try: $("[EMAIL PROTECTED]")[0].multiple = false; You need to actually reference the actual DOM object, not the jQuery array of objects that gets returned. Thanks a lot for your help! I just wanted to reply that wouldn't work either but there was another problem: When I'm hiding some elements