[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: 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