[jQuery] Passing value from function
Hi all, I have trouble passing value as selector value to other function. $(document).ready(function(){ var id = 'Test'; $('#Name').keyup(function(){ id = '#Mobil'; }); $(id).click(function(){ console.log(id); }); }); I am getting on console value "#Mobil" but $(is) is using value "Test". Thx for help in advance. Charlie
[jQuery] Re: AJAX External content doesnt work properly
yep, it seems. I found this article http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F thx mates for helping. On 24 Led, 19:37, "Rick Faircloth" wrote: > Sounds like this may be a situation where you need to use the > plug-in "LiveQuery". It re-activates new links added to the DOM. > > http://brandonaaron.net/docs/livequery/ > > Go to the link above and get the plug-in and check out the usage > instructions. In jQuery 1.3, you can just use .live , but that > function has some limitations that LiveQuery doesn't. > > Check it out and give it a try. > > Rick > > > > > -Original Message- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Charlie22 > > Sent: Saturday, January 24, 2009 12:43 PM > > To: jQuery (English) > > Subject: [jQuery] Re: AJAX External content doesnt work properly > > > sry for incorrect links: > >http://83.240.47.84/skyrace22/pilots.php //working page > >http://83.240.47.84/skyrace22/test.php //problem after loading > > into > > > AJAX is loading content correctly, but anchors in loaded file doesnt > > work in the same way as in original document. Isnt posssible adding > > Javascript code via ajax?? btw I tested also in success AJAX section > > $.getScript from external file, but also no success. Same if I place > > it before AJAX request. > > > On 24 Led, 18:30, "Rick Faircloth" wrote: > > > Charlie, are you saying that your links don't work after > > > an AJAX request places new HTML in your DOM? (in the page?) > > > > Rick > > > > > -Original Message- > > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > > > Behalf Of Charlie22 > > > > Sent: Saturday, January 24, 2009 12:19 PM > > > > To: jQuery (English) > > > > Subject: [jQuery] AJAX External content doesnt work properly > > > > > Hi all, I have problem with page, where I am loading external page > > > > into DIV. This page is working, but after AJAX upload anchors doesnt > > > > work.Scripts are in source code of pages > > > > > htt://83.240.47.84/skyrace22/pilots.php //working page > > > > htt://83.240.47.84/skyrace22/test.php //problem after loading into > > > > DIV in new page > > > > > thx for help- Skrýt citovaný text - > > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: remove()
cool! empty() is that, what I needed. Thank you very much. On 24 Led, 19:54, Ricardo Tomasi wrote: > $('#test').empty() > > (it actually calls $('#test').html('')) > > http://docs.jquery.com/Manipulation/empty > > On Jan 24, 3:28 pm, "Rick Faircloth" wrote: > > > > > This didn't work for me... > > > $('#test').text().remove(); > > > with this HTML: > > > test test > > > However, with this jQuery: > > > $('#test p:contains()').remove(); > > > and this HTML: > > > test test > > > I could remove any text from the p inside the div. It did, however, remove > > the element, as well, > > but it did leave the div in place. (I put a border around the div so I > > could see if it remained...) > > > Seems like it should be easy to remove the text from within an element and > > leave the element, itself, > > but I couldn't figure out a way in a few minutes of experimenting and > > reading the docs. > > > Rick > > > > -Original Message- > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > > Behalf Of brian > > > Sent: Saturday, January 24, 2009 12:19 PM > > > To: jquery-en@googlegroups.com > > > Subject: [jQuery] Re: remove() > > > > remove() should be used if you want to remove the div from the DOM. To > > > empty its contents, just use text() or html(), which will replce the > > > content of the div. > > > > On Sat, Jan 24, 2009 at 12:05 PM, Charlie22 wrote: > > > > > Thx, but I need leave DIV tag on the place..I thought $ > > > > ('#test>*').remove(), but no success. > > > > > On 24 Led, 17:54, brian wrote: > > > >> $('#test').text('') or $('#test').html('') might be what you want. > > > > >> On Sat, Jan 24, 2009 at 11:22 AM, Charlie22 wrote: > > > > >> > I have question how easy remove content from DIV, e.g. > > > >> > test text > > > > >> > I thought that code > > > >> > $('#test').remove() > > > >> > managed it, but it doesnt true. Thx in advance.- Skrýt citovaný text > > > >> > - > > > > >> - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: AJAX External content doesnt work properly
sry for incorrect links: http://83.240.47.84/skyrace22/pilots.php //working page http://83.240.47.84/skyrace22/test.php //problem after loading into AJAX is loading content correctly, but anchors in loaded file doesnt work in the same way as in original document. Isnt posssible adding Javascript code via ajax?? btw I tested also in success AJAX section $.getScript from external file, but also no success. Same if I place it before AJAX request. On 24 Led, 18:30, "Rick Faircloth" wrote: > Charlie, are you saying that your links don't work after > an AJAX request places new HTML in your DOM? (in the page?) > > Rick > > > > > -Original Message- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Charlie22 > > Sent: Saturday, January 24, 2009 12:19 PM > > To: jQuery (English) > > Subject: [jQuery] AJAX External content doesnt work properly > > > Hi all, I have problem with page, where I am loading external page > > into DIV. This page is working, but after AJAX upload anchors doesnt > > work.Scripts are in source code of pages > > > htt://83.240.47.84/skyrace22/pilots.php //working page > > htt://83.240.47.84/skyrace22/test.php //problem after loading into > > DIV in new page > > > thx for help- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: remove()
ah so, I got it now, thx for help, it works. I had there .romeve() in addition. Now its correct! On 24 Led, 18:18, brian wrote: > remove() should be used if you want to remove the div from the DOM. To > empty its contents, just use text() or html(), which will replce the > content of the div. > > > > On Sat, Jan 24, 2009 at 12:05 PM, Charlie22 wrote: > > > Thx, but I need leave DIV tag on the place..I thought $ > > ('#test>*').remove(), but no success. > > > On 24 Led, 17:54, brian wrote: > >> $('#test').text('') or $('#test').html('') might be what you want. > > >> On Sat, Jan 24, 2009 at 11:22 AM, Charlie22 wrote: > > >> > I have question how easy remove content from DIV, e.g. > >> > test text > > >> > I thought that code > >> > $('#test').remove() > >> > managed it, but it doesnt true. Thx in advance.- Skrýt citovaný text - > > >> - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] AJAX External content doesnt work properly
Hi all, I have problem with page, where I am loading external page into DIV. This page is working, but after AJAX upload anchors doesnt work.Scripts are in source code of pages htt://83.240.47.84/skyrace22/pilots.php //working page htt://83.240.47.84/skyrace22/test.php //problem after loading into DIV in new page thx for help
[jQuery] Re: remove()
Thx, but I need leave DIV tag on the place..I thought $ ('#test>*').remove(), but no success. On 24 Led, 17:54, brian wrote: > $('#test').text('') or $('#test').html('') might be what you want. > > > > On Sat, Jan 24, 2009 at 11:22 AM, Charlie22 wrote: > > > I have question how easy remove content from DIV, e.g. > > test text > > > I thought that code > > $('#test').remove() > > managed it, but it doesnt true. Thx in advance.- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] remove()
I have question how easy remove content from DIV, e.g. test text I thought that code $('#test').remove() managed it, but it doesnt true. Thx in advance.
[jQuery] Re: AJAX data in IE
in last links is console.log commented...it doesnt solve main problem. On 24 Led, 15:18, "Rick Faircloth" wrote: > I had a problem running some ajax code in IE and > I believe the problem turned out to be having the > "console.log();" code in there. > > Try commenting that out and see if it runs ok in IE. > > Rick > > > > > -Original Message- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of jay > > Sent: Saturday, January 24, 2009 9:00 AM > > To: jQuery (English) > > Subject: [jQuery] Re: AJAX data in IE > > > When I click any of the links I get jQuery undefined script error line > > 119 in IE > > > On Jan 24, 8:20 am, Charlie22 wrote: > > > sry it didnt work, because console.log there.. > > > > On 24 Led, 14:12, Charlie22 wrote: > > > > > thx for tip, but no success. Try to check this > > > > page..http://83.240.47.84/skyrace22/pilots.php > > > > works everywhere, only IE failed.. > > > > > On 24 Led, 13:38, Mike Alsup wrote: > > > > > > > $(function(){ > > > > > > $('.tablesorter').tablesorter({widgets: ['zebra']}); > > > > > > $('#subMenu a').click(function(){ > > > > > > var trida = $(this).attr('href'); > > > > > > console.log(trida); > > > > > > $('#content>*').remove(); > > > > > > $.ajax({ > > > > > > url: 'pilots.php', > > > > > > cache: false, > > > > > > type: 'POST', > > > > > > dataType: 'html', > > > > > > data: 'trida='+trida, > > > > > > success: function(html){ > > > > > > $('#content').append(html)} > > > > > > }); > > > > > > return false; > > > > > > }); > > > > > > > }); > > > > > > > this code works great, but not in IE. Problem is causing by value > > > > > > "data". > > > > > > If I set: data: 'trida=15', than everything goes OK, but if I set > > > > > > valeu from variable, IE return only a little part of requesting > > > > > > page. > > > > > > So what is wrong in my AJAX code? > > > > > > Try using an object for your data arg so that jQuery properly encodes > > > > > the values. So instead of: > > > > > > data: 'trida='+trida, > > > > > > try this: > > > > > > data: { trida: trida },- Skrýt citovaný text - > > > > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > > > > - Zobrazit citovaný text -- Hide quoted text - > > > > - Show quoted text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: AJAX data in IE
I was testing there something, now it works, but I have problem if I load this workuing page as content to any DIV to other page, it cause error after click to links from loaded page. You can check: http://83.240.47.84/skyrace22/pilots.php //working page http://83.240.47.84/skyrace22/test.php //lodin pilots.php to DIV On 24 Led, 14:59, jay wrote: > When I click any of the links I get jQuery undefined script error line > 119 in IE > > On Jan 24, 8:20 am, Charlie22 wrote: > > > > > sry it didnt work, because console.log there.. > > > On 24 Led, 14:12, Charlie22 wrote: > > > > thx for tip, but no success. Try to check this > > > page..http://83.240.47.84/skyrace22/pilots.php > > > works everywhere, only IE failed.. > > > > On 24 Led, 13:38, Mike Alsup wrote: > > > > > > $(function(){ > > > > > $('.tablesorter').tablesorter({widgets: ['zebra']}); > > > > > $('#subMenu a').click(function(){ > > > > > var trida = $(this).attr('href'); > > > > > console.log(trida); > > > > > $('#content>*').remove(); > > > > > $.ajax({ > > > > > url: 'pilots.php', > > > > > cache: false, > > > > > type: 'POST', > > > > > dataType: 'html', > > > > > data: 'trida='+trida, > > > > > success: function(html){ > > > > > $('#content').append(html)} > > > > > }); > > > > > return false; > > > > > }); > > > > > > }); > > > > > > this code works great, but not in IE. Problem is causing by value > > > > > "data". > > > > > If I set: data: 'trida=15', than everything goes OK, but if I set > > > > > valeu from variable, IE return only a little part of requesting page. > > > > > So what is wrong in my AJAX code? > > > > > Try using an object for your data arg so that jQuery properly encodes > > > > the values. So instead of: > > > > > data: 'trida='+trida, > > > > > try this: > > > > > data: { trida: trida },- Skrýt citovaný text - > > > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > > > - Zobrazit citovaný text -- Hide quoted text - > > > - Show quoted text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: AJAX data in IE
sry it didnt work, because console.log there.. On 24 Led, 14:12, Charlie22 wrote: > thx for tip, but no success. Try to check this > page..http://83.240.47.84/skyrace22/pilots.php > works everywhere, only IE failed.. > > On 24 Led, 13:38, Mike Alsup wrote: > > > > > > $(function(){ > > > $('.tablesorter').tablesorter({widgets: ['zebra']}); > > > $('#subMenu a').click(function(){ > > > var trida = $(this).attr('href'); > > > console.log(trida); > > > $('#content>*').remove(); > > > $.ajax({ > > > url: 'pilots.php', > > > cache: false, > > > type: 'POST', > > > dataType: 'html', > > > data: 'trida='+trida, > > > success: function(html){ > > > $('#content').append(html)} > > > }); > > > return false; > > > }); > > > > }); > > > > this code works great, but not in IE. Problem is causing by value > > > "data". > > > If I set: data: 'trida=15', than everything goes OK, but if I set > > > valeu from variable, IE return only a little part of requesting page. > > > So what is wrong in my AJAX code? > > > Try using an object for your data arg so that jQuery properly encodes > > the values. So instead of: > > > data: 'trida='+trida, > > > try this: > > > data: { trida: trida },- Skrýt citovaný text - > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: AJAX data in IE
thx for tip, but no success. Try to check this page.. http://83.240.47.84/skyrace22/pilots.php works everywhere, only IE failed.. On 24 Led, 13:38, Mike Alsup wrote: > > $(function(){ > > $('.tablesorter').tablesorter({widgets: ['zebra']}); > > $('#subMenu a').click(function(){ > > var trida = $(this).attr('href'); > > console.log(trida); > > $('#content>*').remove(); > > $.ajax({ > > url: 'pilots.php', > > cache: false, > > type: 'POST', > > dataType: 'html', > > data: 'trida='+trida, > > success: function(html){ > > $('#content').append(html)} > > }); > > return false; > > }); > > > }); > > > this code works great, but not in IE. Problem is causing by value > > "data". > > If I set: data: 'trida=15', than everything goes OK, but if I set > > valeu from variable, IE return only a little part of requesting page. > > So what is wrong in my AJAX code? > > Try using an object for your data arg so that jQuery properly encodes > the values. So instead of: > > data: 'trida='+trida, > > try this: > > data: { trida: trida },- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] AJAX data in IE
hi crew, as ususally I have strange problem..take a look to code: $(function(){ $('.tablesorter').tablesorter({widgets: ['zebra']}); $('#subMenu a').click(function(){ var trida = $(this).attr('href'); console.log(trida); $('#content>*').remove(); $.ajax({ url: 'pilots.php', cache: false, type: 'POST', dataType: 'html', data: 'trida='+trida, success: function(html){ $('#content').append(html)} }); return false; }); }); this code works great, but not in IE. Problem is causing by value "data". If I set: data: 'trida=15', than everything goes OK, but if I set valeu from variable, IE return only a little part of requesting page. So what is wrong in my AJAX code?
[jQuery] Re: How show childern in sequence
btw, isnt possible use $.each ?? On 21 Led, 15:52, Charlie22 wrote: > well, thx for nice explanation! Cya later. > > On 21 Led, 15:33, > > > > Liam Potter wrote: > > The animate function is there to create a pause at the start of each > > fadeIn, otherwise all the divs will fade in at the same time. > > You could use a setTimeout for the pause but when I wrote this it wasn't > > an option. > > > If you want to use show() you would change > > > $(this).fadeIn(3000); > > to > > $(this).show(3000); > > > If there are only ever going to be 3 child divs though you could just run > > it like this > > > $("#div1id).show(1500, function(){ > > $("#div2id).show(1500, function(){ > > $("#div3id).show(1500)}; > > )}; > > )}; > > > use the for loop if the amount of divs will change. > > > Charlie22 wrote: > > > Thank you very muhc, is there no way how use show() function? Always I > > > have to make it with animate() function?? > > > > On 21 Led, 15:09, Liam Potter wrote: > > > >> you could use a for loop and use the animate function for a pause. > > >> eg > > > >> var current = 0; > > >> var max_div = ($("parent_div").children().size()-1); > > >> for(current=0;current<=max_div;current++) > > >> { > > > >> $("parent_div") > > >> .children("div") > > >> .eq(current) > > >> .animate({opacity: 1.0},((3000*current)+1000), function () { > > > >> $(this).fadeIn(3000); > > > >> }) > > > >> } > > > >> There is definitely a better way to do this, but this is what I came up > > >> when I needed something similar. > > > >> Charlie22 wrote: > > > >>> Hi all, > > >>> I need a litlle help with this problem. I have 3 DIVs inside Parent > > >>> DIV and I need show this childern's DIVs in sequence. Firstly first, > > >>> than next etc. Is there anz function, because code below shows all > > >>> DIVs parallery. Thx for input.- Skrýt citovaný text - > > > >> - Zobrazit citovaný text -- Skrýt citovaný text - > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: How show childern in sequence
well, thx for nice explanation! Cya later. On 21 Led, 15:33, Liam Potter wrote: > The animate function is there to create a pause at the start of each > fadeIn, otherwise all the divs will fade in at the same time. > You could use a setTimeout for the pause but when I wrote this it wasn't > an option. > > If you want to use show() you would change > > $(this).fadeIn(3000); > to > $(this).show(3000); > > If there are only ever going to be 3 child divs though you could just run it > like this > > $("#div1id).show(1500, function(){ > $("#div2id).show(1500, function(){ > $("#div3id).show(1500)}; > )}; > )}; > > use the for loop if the amount of divs will change. > > > > Charlie22 wrote: > > Thank you very muhc, is there no way how use show() function? Always I > > have to make it with animate() function?? > > > On 21 Led, 15:09, Liam Potter wrote: > > >> you could use a for loop and use the animate function for a pause. > >> eg > > >> var current = 0; > >> var max_div = ($("parent_div").children().size()-1); > >> for(current=0;current<=max_div;current++) > >> { > > >> $("parent_div") > >> .children("div") > >> .eq(current) > >> .animate({opacity: 1.0},((3000*current)+1000), function () { > > >> $(this).fadeIn(3000); > > >> }) > > >> } > > >> There is definitely a better way to do this, but this is what I came up > >> when I needed something similar. > > >> Charlie22 wrote: > > >>> Hi all, > >>> I need a litlle help with this problem. I have 3 DIVs inside Parent > >>> DIV and I need show this childern's DIVs in sequence. Firstly first, > >>> than next etc. Is there anz function, because code below shows all > >>> DIVs parallery. Thx for input.- Skrýt citovaný text - > > >> - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: How show childern in sequence
Thank you very muhc, is there no way how use show() function? Always I have to make it with animate() function?? On 21 Led, 15:09, Liam Potter wrote: > you could use a for loop and use the animate function for a pause. > eg > > var current = 0; > var max_div = ($("parent_div").children().size()-1); > for(current=0;current<=max_div;current++) > { > > $("parent_div") > .children("div") > .eq(current) > .animate({opacity: 1.0},((3000*current)+1000), function () { > > $(this).fadeIn(3000); > > }) > > } > > There is definitely a better way to do this, but this is what I came up > when I needed something similar. > > > > Charlie22 wrote: > > Hi all, > > I need a litlle help with this problem. I have 3 DIVs inside Parent > > DIV and I need show this childern's DIVs in sequence. Firstly first, > > than next etc. Is there anz function, because code below shows all > > DIVs parallery. Thx for input.- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] How show childern in sequence
Hi all, I need a litlle help with this problem. I have 3 DIVs inside Parent DIV and I need show this childern's DIVs in sequence. Firstly first, than next etc. Is there anz function, because code below shows all DIVs parallery. Thx for input.
[jQuery] Re: Content loading with AJAX is lost in IE after click
yes, I found this solvent also, but than I have problem with double IDs, because anchor has same ID as container with target text. Finally I solved it by most easy way. I set variable, which identify container id from content of anchor: var rules = '#'+$(this).html().toLowerCase(); Easy, isnt it? Anyway many thx for your time and tips!! Cya, Charlie On 21 Led, 00:31, "Rick Faircloth" wrote: > What about forming your clickable link like this: > > General > > Then write a function based on the id: > > $(document).ready(function() { > > $('#general').click(function() { > ...your function here... > }); > > }); > > That would remove the href from the sitation and > still give you a clickable link... > > Thought it might be worth a try. > > I've set up a little demo of this method: > > Try this URL and click on "General":http://jsbin.com/uvuji, > then have a look at the code source and see if it might > be useful. > > Rick > > > > > -Original Message- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Charlie22 > > Sent: Tuesday, January 20, 2009 5:31 PM > > To: jQuery (English) > > Subject: [jQuery] Re: Content loading with AJAX is lost in IE after click > > > ..so value isnt lost, but have other value as in FF and Gch: > > problem is here: > > > General > > $(this).attr('href'); > > Results: > > FF> value is general //valid for script > > IE> value ishttp://www.something.cz/general//IE is adding domain > > > is there any easy way how cut domain name ?? > > > On 20 Led, 22:49, Charlie22 wrote: > > > hm, if I set directly $(#pilots). show(); it works, but if there is > > > varibale $('#'+anyVariable).show(); IE is loosing value of this > > > variable after click, thats all problem. But how can I solve it? > > > > On 20 Led, 20:06, "Rick Faircloth" wrote: > > > > > Try specifying "display:block" as the attribute, instead > > > > of eliminating the style completely. Perhaps that will > > > > override what IE is doing. > > > > > In your code (wherever would be appropriate), try > > > > $('#general').css({'display':'block'}) > > > > and see what happens. Since you're using an AJAX call to > > > > replace your original content, be sure and do this after > > > > the AJAX call is complete. > > > > > Rick > > > > > > -Original Message- > > > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] > > > > > On Behalf Of Charlie22 > > > > > Sent: Tuesday, January 20, 2009 1:37 PM > > > > > To: jQuery (English) > > > > > Subject: [jQuery] Re: Content loading with AJAX is lost in IE after > > > > > click > > > > > > Thx for tips Rick, > > > > > but still I have no success. IE is adding his style from reason > > > > > unknown for me and isnt respect jQuery commands. > > > > > > I tried this code: > > > > > $('#'+submenu).attr('style',''); > > > > > > IE is generating this code always: > > > > > > > > > > > I am really desparete from this... > > > > > > On 20 Led, 18:07, "Rick Faircloth" wrote: > > > > > > Also, Charlie, if I use IE7's Developer Toolbar to change the > > > > > > div id="general" from display:none to display:block, all the > > > > > > content shows up normally, as it does in FF3. > > > > > > > Find out what's changing the display attr to display:none and > > > > > > prevent that and you should be good-to-go... > > > > > > > Rick > > > > > > > > -Original Message- > > > > > > > From: jquery-en@googlegroups.com > > > > > > > [mailto:jquery...@googlegroups.com] On Behalf Of > Charlie22 > > > > > > > Sent: Tuesday, January 20, 2009 10:59 AM > > > > > > > To: jQuery (English) > > > > > > > Subject: [jQuery] Content loading with AJAX is lost in IE after > > > > > > > click > > > > > > > > Hi all, > > > > > > > can you check pls, what I am doing wrong in these scripts. Check > > > > > > > pls > > > > > > > menu "Rules" and its submenu functions. In FF3 and GCh its works > > > > > > > fine, > > > > > > > but in IE it lost part of ajax content. > > > > > > > > address:http://83.240.47.84/skyrace2/ > > > > > > > > Thank you for your help in advance.- Skrýt citovaný text - > > > > > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > > > - Zobrazit citovaný text -
[jQuery] Re: Content loading with AJAX is lost in IE after click
..so value isnt lost, but have other value as in FF and Gch: problem is here: General $(this).attr('href'); Results: FF> value is general //valid for script IE> value is http://www.something.cz/general //IE is adding domain is there any easy way how cut domain name ?? On 20 Led, 22:49, Charlie22 wrote: > hm, if I set directly $(#pilots). show(); it works, but if there is > varibale $('#'+anyVariable).show(); IE is loosing value of this > variable after click, thats all problem. But how can I solve it? > > On 20 Led, 20:06, "Rick Faircloth" wrote: > > > > > Try specifying "display:block" as the attribute, instead > > of eliminating the style completely. Perhaps that will > > override what IE is doing. > > > In your code (wherever would be appropriate), try > > $('#general').css({'display':'block'}) > > and see what happens. Since you're using an AJAX call to > > replace your original content, be sure and do this after > > the AJAX call is complete. > > > Rick > > > > -Original Message- > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > > Behalf Of Charlie22 > > > Sent: Tuesday, January 20, 2009 1:37 PM > > > To: jQuery (English) > > > Subject: [jQuery] Re: Content loading with AJAX is lost in IE after click > > > > Thx for tips Rick, > > > but still I have no success. IE is adding his style from reason > > > unknown for me and isnt respect jQuery commands. > > > > I tried this code: > > > $('#'+submenu).attr('style',''); > > > > IE is generating this code always: > > > > > > > I am really desparete from this... > > > > On 20 Led, 18:07, "Rick Faircloth" wrote: > > > > Also, Charlie, if I use IE7's Developer Toolbar to change the > > > > div id="general" from display:none to display:block, all the > > > > content shows up normally, as it does in FF3. > > > > > Find out what's changing the display attr to display:none and > > > > prevent that and you should be good-to-go... > > > > > Rick > > > > > > -Original Message- > > > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] > > > > > On Behalf Of Charlie22 > > > > > Sent: Tuesday, January 20, 2009 10:59 AM > > > > > To: jQuery (English) > > > > > Subject: [jQuery] Content loading with AJAX is lost in IE after click > > > > > > Hi all, > > > > > can you check pls, what I am doing wrong in these scripts. Check pls > > > > > menu "Rules" and its submenu functions. In FF3 and GCh its works fine, > > > > > but in IE it lost part of ajax content. > > > > > > address:http://83.240.47.84/skyrace2/ > > > > > > Thank you for your help in advance.- Skrýt citovaný text - > > > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: Content loading with AJAX is lost in IE after click
hm, if I set directly $(#pilots). show(); it works, but if there is varibale $('#'+anyVariable).show(); IE is loosing value of this variable after click, thats all problem. But how can I solve it? On 20 Led, 20:06, "Rick Faircloth" wrote: > Try specifying "display:block" as the attribute, instead > of eliminating the style completely. Perhaps that will > override what IE is doing. > > In your code (wherever would be appropriate), try > $('#general').css({'display':'block'}) > and see what happens. Since you're using an AJAX call to > replace your original content, be sure and do this after > the AJAX call is complete. > > Rick > > > > > -Original Message- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Charlie22 > > Sent: Tuesday, January 20, 2009 1:37 PM > > To: jQuery (English) > > Subject: [jQuery] Re: Content loading with AJAX is lost in IE after click > > > Thx for tips Rick, > > but still I have no success. IE is adding his style from reason > > unknown for me and isnt respect jQuery commands. > > > I tried this code: > > $('#'+submenu).attr('style',''); > > > IE is generating this code always: > > > > > I am really desparete from this... > > > On 20 Led, 18:07, "Rick Faircloth" wrote: > > > Also, Charlie, if I use IE7's Developer Toolbar to change the > > > div id="general" from display:none to display:block, all the > > > content shows up normally, as it does in FF3. > > > > Find out what's changing the display attr to display:none and > > > prevent that and you should be good-to-go... > > > > Rick > > > > > -Original Message- > > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > > > Behalf Of Charlie22 > > > > Sent: Tuesday, January 20, 2009 10:59 AM > > > > To: jQuery (English) > > > > Subject: [jQuery] Content loading with AJAX is lost in IE after click > > > > > Hi all, > > > > can you check pls, what I am doing wrong in these scripts. Check pls > > > > menu "Rules" and its submenu functions. In FF3 and GCh its works fine, > > > > but in IE it lost part of ajax content. > > > > > address:http://83.240.47.84/skyrace2/ > > > > > Thank you for your help in advance.- Skrýt citovaný text - > > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: Content loading with AJAX is lost in IE after click
Thx for tips Rick, but still I have no success. IE is adding his style from reason unknown for me and isnt respect jQuery commands. I tried this code: $('#'+submenu).attr('style',''); IE is generating this code always: I am really desparete from this... On 20 Led, 18:07, "Rick Faircloth" wrote: > Also, Charlie, if I use IE7's Developer Toolbar to change the > div id="general" from display:none to display:block, all the > content shows up normally, as it does in FF3. > > Find out what's changing the display attr to display:none and > prevent that and you should be good-to-go... > > Rick > > > > > -Original Message- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of Charlie22 > > Sent: Tuesday, January 20, 2009 10:59 AM > > To: jQuery (English) > > Subject: [jQuery] Content loading with AJAX is lost in IE after click > > > Hi all, > > can you check pls, what I am doing wrong in these scripts. Check pls > > menu "Rules" and its submenu functions. In FF3 and GCh its works fine, > > but in IE it lost part of ajax content. > > > address:http://83.240.47.84/skyrace2/ > > > Thank you for your help in advance.- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Content loading with AJAX is lost in IE after click
Hi all, can you check pls, what I am doing wrong in these scripts. Check pls menu "Rules" and its submenu functions. In FF3 and GCh its works fine, but in IE it lost part of ajax content. address: http://83.240.47.84/skyrace2/ Thank you for your help in advance.
[jQuery] Re: jquery.com and IE7
I found smtg strange. I tried to log to my PC under other account and with new user account IE7 works with jQuery.com fine. It seems there must smtg wrong with my account profile in WinXP, so definitelly its not problem by jQuery.com. On 18 Led, 10:38, Charlie22 wrote: > I have one question yet. Is possible use jquery.com design for Czech > fan site or is there any terms of use? > > On Jan 18, 9:20 am, Charlie22 wrote: > > > > > just only notice, that before jQuery 1.3 realese it works fine also in > > my IE7 > > > On Jan 18, 9:16 am, Charlie22 wrote: > > > > Hi Karl, thx for answer. I am using IE7 - Czech language version - all > > > patch installed. > > > screenshot:http://83.240.47.84/skyrace2/ie7_jquery.jpg > > > > On Jan 18, 3:51 am, Karl Swedberg wrote: > > > > > Hi Charlie, > > > > > I'm not seeing the problem. It looks like there is some extra white > > > > space after method names, but it's certainly readable. Here is a > > > > screenshot: > > > > >http://skitch.com/kswedberg/bbte7/jquery.com-in-ie7 > > > > > Can you post a screenshot of what you're seeing, too, so I can try to > > > > diagnose the problem? > > > > > Thanks, > > > > > --Karl > > > > > > > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > > > On Jan 17, 2009, at 6:27 PM, Charlie22 wrote: > > > > > > hi all, > > > > > its only me or somebody has problem with jquery.com?? In IE7 I dont > > > > > see after a few seconds white background and pages are unreadable. > > > > > Only main page is working correctly. Thx for info- Skrýt citovaný > > > > > text - > > - Zobrazit citovaný text -
[jQuery] Re: How select first link??
anz reason, why didnt you use #menu li a:first ? On 18 Led, 18:48, "gareth gwyther" wrote: > i think > jQuery('#menu li a').eq(0).remove(); > or > jQuery'(#menu li').eq(0).remove(); for valid html removing both the li > and the link > > eq(number) is the position in the array of the selector. Hence 0 being first > > hope this helps > > On 1/18/09, Charlie22 wrote: > > > > > > > and how can you create selector for first link in this case?: > > > > > > > Home > > Rules > > > > > > > On 18 Led, 15:35, "kellyjandr...@sbcglobal.net" > > wrote: > >> Bah - I see they "fixed" it. You should not be able to select only one > >> anchor tag in this instance using $('#menu li a:first') > > >> On Jan 18, 9:33 am, "kellyjandr...@sbcglobal.net" > > >> wrote: > >> > The question on all of this is usage - and I don't know how clear it > >> > was stated. > > >> > The selectors everyone has put up are valid, but not necessarily for > >> > the usage. > > >> > < >> > a first link in code below. Can you help me how how it should look > >> > like jQuery code and also for case, if Home will not be a link, so > >> > "Rules" will be a first link.>> > > >> > So the issue is to remove only the first link. $('#menu li:first a) > >> > will only select the anchor inside first list item. Perfect until you > >> > put home inside that with no link. Then nothing matches that criteria. > > >> > $('#menu li a:first') matches up to the first anchor tag inside a > >> > li.http://test.learningjquery.com/selector-bug.htmlProves the theory. > >> > If you did a selector of 'p' it would affect ALL of them, right? So > >> > there are 7 anchors in the first position of an li, and 0 in the > >> > second. Jquery 1.3 didn't create a bug - it fixed a selector problem. > > >> > The only true selector is to use $('#menu a:first'). It will select > >> > the first anchor and only the first anchor. > > >> > It all just problem with sloppy selectors in the past. They cleaned it > >> > up and got it right. I would suggest we make the adjustments. > > >> > On Jan 17, 4:19 pm, "Nic Luciano" wrote: > > >> > > Ah, Karl, I see the issue now. I was also confused with the original > >> > > usage > >> > > since the discussion was about :first but he was using :first-child. > >> > > So let > >> > > me ask, in your test, li a:first should only return one element (as > >> > > per > >> > > docs, :first should always only return one element), correct? And > >> > > first-child would be what I originally expected (returning 7 links)? > > >> > > Can't believe I overlooked that- I stand corrected :D > > >> > > On Sat, Jan 17, 2009 at 4:13 PM, Ricardo Tomasi > >> > > wrote: > > >> > > > I know this isn't the dev list, but I'm curious about how come these > >> > > > bugs weren't caught by the test suite? > > >> > > > On Jan 17, 6:50 pm, Karl Swedberg wrote: > >> > > > > Nic, > >> > > > > Actually, it is a bug, at least in the sense that the results are > >> > > > > different from those of any previous version of jQuery. > > >> > > > > It isn't just about :first, though. It has to do with multiple- > >> > > > > descendant selectors in general. I've provided a test case > >> > > > > athttp:// > >> > > > test.learningjquery.com/selector-bug.html > >> > > > > with side-by-side comparison of 1.2.6 and 1.3, showing the > >> > > > > number of > >> > > > > matches (and I also posted an update to the ticket). > > >> > > > > --Karl > > >> > > > > > >> > > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > >> > > > > On Jan 17, 2009, at 3:39 PM, Nic Luciano wrote: > > >> > > > > > That's true, but that's exactly how it's supposed to function. > > >> > > > > > On Sat, Jan 17, 2009 at 3:35 PM, jQuery Lover > >> > > > > > wrote: &g
[jQuery] Re: How select first link??
and how can you create selector for first link in this case?: Home Rules On 18 Led, 15:35, "kellyjandr...@sbcglobal.net" wrote: > Bah - I see they "fixed" it. You should not be able to select only one > anchor tag in this instance using $('#menu li a:first') > > On Jan 18, 9:33 am, "kellyjandr...@sbcglobal.net" > > > > wrote: > > The question on all of this is usage - and I don't know how clear it > > was stated. > > > The selectors everyone has put up are valid, but not necessarily for > > the usage. > > > < > a first link in code below. Can you help me how how it should look > > like jQuery code and also for case, if Home will not be a link, so > > "Rules" will be a first link.>> > > > So the issue is to remove only the first link. $('#menu li:first a) > > will only select the anchor inside first list item. Perfect until you > > put home inside that with no link. Then nothing matches that criteria. > > > $('#menu li a:first') matches up to the first anchor tag inside a > > li.http://test.learningjquery.com/selector-bug.html Proves the theory. > > If you did a selector of 'p' it would affect ALL of them, right? So > > there are 7 anchors in the first position of an li, and 0 in the > > second. Jquery 1.3 didn't create a bug - it fixed a selector problem. > > > The only true selector is to use $('#menu a:first'). It will select > > the first anchor and only the first anchor. > > > It all just problem with sloppy selectors in the past. They cleaned it > > up and got it right. I would suggest we make the adjustments. > > > On Jan 17, 4:19 pm, "Nic Luciano" wrote: > > > > Ah, Karl, I see the issue now. I was also confused with the original usage > > > since the discussion was about :first but he was using :first-child. So > > > let > > > me ask, in your test, li a:first should only return one element (as per > > > docs, :first should always only return one element), correct? And > > > first-child would be what I originally expected (returning 7 links)? > > > > Can't believe I overlooked that- I stand corrected :D > > > > On Sat, Jan 17, 2009 at 4:13 PM, Ricardo Tomasi > > > wrote: > > > > > I know this isn't the dev list, but I'm curious about how come these > > > > bugs weren't caught by the test suite? > > > > > On Jan 17, 6:50 pm, Karl Swedberg wrote: > > > > > Nic, > > > > > Actually, it is a bug, at least in the sense that the results are > > > > > different from those of any previous version of jQuery. > > > > > > It isn't just about :first, though. It has to do with multiple- > > > > > descendant selectors in general. I've provided a test case athttp:// > > > > test.learningjquery.com/selector-bug.html > > > > > with side-by-side comparison of 1.2.6 and 1.3, showing the number of > > > > > matches (and I also posted an update to the ticket). > > > > > > --Karl > > > > > > > > > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > > > > On Jan 17, 2009, at 3:39 PM, Nic Luciano wrote: > > > > > > > That's true, but that's exactly how it's supposed to function. > > > > > > > On Sat, Jan 17, 2009 at 3:35 PM, jQuery Lover > > > > > > wrote: > > > > > > > No he is not! > > > > > > > Suppose you have this scenario: > > > > > > > > > > > > > > > > > > > Home > > > > > > Rules > > > > > > Pilots > > > > > > Briefing > > > > > > IGC > > > > > > Results > > > > > > Forum > > > > > > > > > > > > > > > > > > > $('#menu li:first a').remove() - will do nothing here, since first > > > > > > li > > > > > > has no anchor in it ! > > > > > > > > > > > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > > > > > On Sun, Jan 18, 2009 at 1:28 AM, Charlie22 wrote: > > > > > > > > Well, you are right, thx for explanation. Now it is clear!! > > > > > > > > On 17 Led, 21:04, Pedram wrote: > > > > > > >> hi Guys , I know what should you do , > > > > > > >> $('#menu li:first a').remove() > > > > > > >> this is the code you need , jquery has no problem when you use > > > > > > >> this > > > > > > >> code $('#menu li a:first').remove(); the selector checks each li > > > > > > and > > > > > > >> removes the so all of the links will be removed so in your > > > > > > >> case > > > > > > >> your code should look like this $('#menu li:first a').remove(); > > > > > > the > > > > > > >> selector selects the first li and removes the > > > > > > >> that set, > > > > > > >> I am just following john Resig in twitter it seems he is going to > > > > > > >> release jquery 1.3.1 maybe he found some little bugs.- Skrýt > > > > > > >> citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: jquery.com and IE7
I have one question yet. Is possible use jquery.com design for Czech fan site or is there any terms of use? On Jan 18, 9:20 am, Charlie22 wrote: > just only notice, that before jQuery 1.3 realese it works fine also in > my IE7 > > On Jan 18, 9:16 am, Charlie22 wrote: > > > Hi Karl, thx for answer. I am using IE7 - Czech language version - all > > patch installed. > > screenshot:http://83.240.47.84/skyrace2/ie7_jquery.jpg > > > On Jan 18, 3:51 am, Karl Swedberg wrote: > > > > Hi Charlie, > > > > I'm not seeing the problem. It looks like there is some extra white > > > space after method names, but it's certainly readable. Here is a > > > screenshot: > > > >http://skitch.com/kswedberg/bbte7/jquery.com-in-ie7 > > > > Can you post a screenshot of what you're seeing, too, so I can try to > > > diagnose the problem? > > > > Thanks, > > > > --Karl > > > > > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > > On Jan 17, 2009, at 6:27 PM, Charlie22 wrote: > > > > > hi all, > > > > its only me or somebody has problem with jquery.com?? In IE7 I dont > > > > see after a few seconds white background and pages are unreadable. > > > > Only main page is working correctly. Thx for info
[jQuery] Re: jquery.com and IE7
just only notice, that before jQuery 1.3 realese it works fine also in my IE7 On Jan 18, 9:16 am, Charlie22 wrote: > Hi Karl, thx for answer. I am using IE7 - Czech language version - all > patch installed. > screenshot:http://83.240.47.84/skyrace2/ie7_jquery.jpg > > On Jan 18, 3:51 am, Karl Swedberg wrote: > > > Hi Charlie, > > > I'm not seeing the problem. It looks like there is some extra white > > space after method names, but it's certainly readable. Here is a > > screenshot: > > >http://skitch.com/kswedberg/bbte7/jquery.com-in-ie7 > > > Can you post a screenshot of what you're seeing, too, so I can try to > > diagnose the problem? > > > Thanks, > > > --Karl > > > ____ > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > On Jan 17, 2009, at 6:27 PM, Charlie22 wrote: > > > > hi all, > > > its only me or somebody has problem with jquery.com?? In IE7 I dont > > > see after a few seconds white background and pages are unreadable. > > > Only main page is working correctly. Thx for info
[jQuery] Re: jquery.com and IE7
Hi Karl, thx for answer. I am using IE7 - Czech language version - all patch installed. screenshot: http://83.240.47.84/skyrace2/ie7_jquery.jpg On Jan 18, 3:51 am, Karl Swedberg wrote: > Hi Charlie, > > I'm not seeing the problem. It looks like there is some extra white > space after method names, but it's certainly readable. Here is a > screenshot: > > http://skitch.com/kswedberg/bbte7/jquery.com-in-ie7 > > Can you post a screenshot of what you're seeing, too, so I can try to > diagnose the problem? > > Thanks, > > --Karl > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Jan 17, 2009, at 6:27 PM, Charlie22 wrote: > > > > > hi all, > > its only me or somebody has problem with jquery.com?? In IE7 I dont > > see after a few seconds white background and pages are unreadable. > > Only main page is working correctly. Thx for info
[jQuery] jquery.com and IE7
hi all, its only me or somebody has problem with jquery.com?? In IE7 I dont see after a few seconds white background and pages are unreadable. Only main page is working correctly. Thx for info
[jQuery] Re: How select first link??
Sry for confusing, but that pcs of code was from testing page, where I tested all alternatives.. On Jan 17, 10:19 pm, "Nic Luciano" wrote: > Ah, Karl, I see the issue now. I was also confused with the original usage > since the discussion was about :first but he was using :first-child. So let > me ask, in your test, li a:first should only return one element (as per > docs, :first should always only return one element), correct? And > first-child would be what I originally expected (returning 7 links)? > > Can't believe I overlooked that- I stand corrected :D > > On Sat, Jan 17, 2009 at 4:13 PM, Ricardo Tomasi wrote: > > > > > I know this isn't the dev list, but I'm curious about how come these > > bugs weren't caught by the test suite? > > > On Jan 17, 6:50 pm, Karl Swedberg wrote: > > > Nic, > > > Actually, it is a bug, at least in the sense that the results are > > > different from those of any previous version of jQuery. > > > > It isn't just about :first, though. It has to do with multiple- > > > descendant selectors in general. I've provided a test case athttp:// > > test.learningjquery.com/selector-bug.html > > > with side-by-side comparison of 1.2.6 and 1.3, showing the number of > > > matches (and I also posted an update to the ticket). > > > > --Karl > > > > > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > > On Jan 17, 2009, at 3:39 PM, Nic Luciano wrote: > > > > > That's true, but that's exactly how it's supposed to function. > > > > > On Sat, Jan 17, 2009 at 3:35 PM, jQuery Lover > > > > wrote: > > > > > No he is not! > > > > > Suppose you have this scenario: > > > > > > > > > > > > > Home > > > > Rules > > > > Pilots > > > > Briefing > > > > IGC > > > > Results > > > > Forum > > > > > > > > > > > > > $('#menu li:first a').remove() - will do nothing here, since first li > > > > has no anchor in it ! > > > > > > > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > > > On Sun, Jan 18, 2009 at 1:28 AM, Charlie22 wrote: > > > > > > Well, you are right, thx for explanation. Now it is clear!! > > > > > > On 17 Led, 21:04, Pedram wrote: > > > > >> hi Guys , I know what should you do , > > > > >> $('#menu li:first a').remove() > > > > >> this is the code you need , jquery has no problem when you use this > > > > >> code $('#menu li a:first').remove(); the selector checks each li > > > > and > > > > >> removes the so all of the links will be removed so in your case > > > > >> your code should look like this $('#menu li:first a').remove(); > > > > the > > > > >> selector selects the first li and removes the > > > > >> that set, > > > > >> I am just following john Resig in twitter it seems he is going to > > > > >> release jquery 1.3.1 maybe he found some little bugs.
[jQuery] Re: How select first link??
pity, that I need new feuture .live actually, thats why I used 1.3 version. Is any predicition when it can be solved? On Jan 17, 10:19 pm, "Nic Luciano" wrote: > Ah, Karl, I see the issue now. I was also confused with the original usage > since the discussion was about :first but he was using :first-child. So let > me ask, in your test, li a:first should only return one element (as per > docs, :first should always only return one element), correct? And > first-child would be what I originally expected (returning 7 links)? > > Can't believe I overlooked that- I stand corrected :D > > On Sat, Jan 17, 2009 at 4:13 PM, Ricardo Tomasi wrote: > > > > > I know this isn't the dev list, but I'm curious about how come these > > bugs weren't caught by the test suite? > > > On Jan 17, 6:50 pm, Karl Swedberg wrote: > > > Nic, > > > Actually, it is a bug, at least in the sense that the results are > > > different from those of any previous version of jQuery. > > > > It isn't just about :first, though. It has to do with multiple- > > > descendant selectors in general. I've provided a test case athttp:// > > test.learningjquery.com/selector-bug.html > > > with side-by-side comparison of 1.2.6 and 1.3, showing the number of > > > matches (and I also posted an update to the ticket). > > > > --Karl > > > > > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > > On Jan 17, 2009, at 3:39 PM, Nic Luciano wrote: > > > > > That's true, but that's exactly how it's supposed to function. > > > > > On Sat, Jan 17, 2009 at 3:35 PM, jQuery Lover > > > > wrote: > > > > > No he is not! > > > > > Suppose you have this scenario: > > > > > > > > > > > > > Home > > > > Rules > > > > Pilots > > > > Briefing > > > > IGC > > > > Results > > > > Forum > > > > > > > > > > > > > $('#menu li:first a').remove() - will do nothing here, since first li > > > > has no anchor in it ! > > > > > > > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > > > On Sun, Jan 18, 2009 at 1:28 AM, Charlie22 wrote: > > > > > > Well, you are right, thx for explanation. Now it is clear!! > > > > > > On 17 Led, 21:04, Pedram wrote: > > > > >> hi Guys , I know what should you do , > > > > >> $('#menu li:first a').remove() > > > > >> this is the code you need , jquery has no problem when you use this > > > > >> code $('#menu li a:first').remove(); the selector checks each li > > > > and > > > > >> removes the so all of the links will be removed so in your case > > > > >> your code should look like this $('#menu li:first a').remove(); > > > > the > > > > >> selector selects the first li and removes the > > > > >> that set, > > > > >> I am just following john Resig in twitter it seems he is going to > > > > >> release jquery 1.3.1 maybe he found some little bugs.
[jQuery] Re: How select first link??
I assume it is the general bug, so lets hope it will be fixed asap. On Jan 17, 10:13 pm, Ricardo Tomasi wrote: > I know this isn't the dev list, but I'm curious about how come these > bugs weren't caught by the test suite? > > On Jan 17, 6:50 pm, Karl Swedberg wrote: > > > Nic, > > Actually, it is a bug, at least in the sense that the results are > > different from those of any previous version of jQuery. > > > It isn't just about :first, though. It has to do with multiple- > > descendant selectors in general. I've provided a test case > > athttp://test.learningjquery.com/selector-bug.html > > with side-by-side comparison of 1.2.6 and 1.3, showing the number of > > matches (and I also posted an update to the ticket). > > > --Karl > > > > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > On Jan 17, 2009, at 3:39 PM, Nic Luciano wrote: > > > > That's true, but that's exactly how it's supposed to function. > > > > On Sat, Jan 17, 2009 at 3:35 PM, jQuery Lover > > > wrote: > > > > No he is not! > > > > Suppose you have this scenario: > > > > > > > > > > Home > > > Rules > > > Pilots > > > Briefing > > > IGC > > > Results > > > Forum > > > > > > > > > > $('#menu li:first a').remove() - will do nothing here, since first li > > > has no anchor in it ! > > > > > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > > On Sun, Jan 18, 2009 at 1:28 AM, Charlie22 wrote: > > > > > Well, you are right, thx for explanation. Now it is clear!! > > > > > On 17 Led, 21:04, Pedram wrote: > > > >> hi Guys , I know what should you do , > > > >> $('#menu li:first a').remove() > > > >> this is the code you need , jquery has no problem when you use this > > > >> code $('#menu li a:first').remove(); the selector checks each li > > > and > > > >> removes the so all of the links will be removed so in your case > > > >> your code should look like this $('#menu li:first a').remove(); > > > the > > > >> selector selects the first li and removes the > > > >> that set, > > > >> I am just following john Resig in twitter it seems he is going to > > > >> release jquery 1.3.1 maybe he found some little bugs.
[jQuery] Re: How select first link??
jQuery has true. How can I select first link? this is original question. And why doesnt work this code $('#menu li a:first')? On 17 Led, 21:39, "Nic Luciano" wrote: > That's true, but that's exactly how it's supposed to function. > > > > On Sat, Jan 17, 2009 at 3:35 PM, jQuery Lover wrote: > > > No he is not! > > > Suppose you have this scenario: > > > > > > > Home > > Rules > > Pilots > > Briefing > > IGC > > Results > > Forum > > > > > > > $('#menu li:first a').remove() - will do nothing here, since first li > > has no anchor in it ! > > > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > On Sun, Jan 18, 2009 at 1:28 AM, Charlie22 wrote: > > > > Well, you are right, thx for explanation. Now it is clear!! > > > > On 17 Led, 21:04, Pedram wrote: > > >> hi Guys , I know what should you do , > > >> $('#menu li:first a').remove() > > >> this is the code you need , jquery has no problem when you use this > > >> code $('#menu li a:first').remove(); the selector checks each li and > > >> removes the so all of the links will be removed so in your case > > >> your code should look like this $('#menu li:first a').remove(); the > > >> selector selects the first li and removes the > > >> that set, > > >> I am just following john Resig in twitter it seems he is going to > > >> release jquery 1.3.1 maybe he found some little bugs.- Skrýt citovaný > > >> text - > > - Zobrazit citovaný text -
[jQuery] Re: How select first link??
Well, you are right, thx for explanation. Now it is clear!! On 17 Led, 21:04, Pedram wrote: > hi Guys , I know what should you do , > $('#menu li:first a').remove() > this is the code you need , jquery has no problem when you use this > code $('#menu li a:first').remove(); the selector checks each li and > removes the so all of the links will be removed so in your case > your code should look like this $('#menu li:first a').remove(); the > selector selects the first li and removes the > that set, > I am just following john Resig in twitter it seems he is going to > release jquery 1.3.1 maybe he found some little bugs . > > On Jan 17, 2:37 pm, Charlie22 wrote: > > > > > ok, thx for your help guys, because it made me crazy for a while and > > thx for your bug report jQuery Lover. I am new pretty new and jQuery I > > am using 2-3 weeks and it is great TOOL!!! > > > On 17 Led, 20:33, jQuery Lover wrote: > > > > Submitted a ticket:http://dev.jquery.com/ticket/3903 > > > > Let's see what happens :) > > > > > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > > On Sun, Jan 18, 2009 at 12:32 AM, Charlie22 wrote: > > > > > so why it doesnt work?? is it jQuery bug? > > > > > On 17 Led, 20:30, jQuery Lover wrote: > > > >> It is... > > > > >> > > > >> Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > > >> On Sun, Jan 18, 2009 at 12:27 AM, Charlie22 wrote: > > > > >> > yes, that is what I said..not working, so I have to replace any > > > >> > scripts. I thought that "#menu li a" is regular CSS selector...or > > > >> > not??- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: How select first link??
ok, thx for your help guys, because it made me crazy for a while and thx for your bug report jQuery Lover. I am new pretty new and jQuery I am using 2-3 weeks and it is great TOOL!!! On 17 Led, 20:33, jQuery Lover wrote: > Submitted a ticket:http://dev.jquery.com/ticket/3903 > > Let's see what happens :) > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Sun, Jan 18, 2009 at 12:32 AM, Charlie22 wrote: > > > so why it doesnt work?? is it jQuery bug? > > > On 17 Led, 20:30, jQuery Lover wrote: > >> It is... > > >> > >> Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > >> On Sun, Jan 18, 2009 at 12:27 AM, Charlie22 wrote: > > >> > yes, that is what I said..not working, so I have to replace any > >> > scripts. I thought that "#menu li a" is regular CSS selector...or > >> > not??
[jQuery] Re: How select first link??
so why it doesnt work?? is it jQuery bug? On 17 Led, 20:30, jQuery Lover wrote: > It is... > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Sun, Jan 18, 2009 at 12:27 AM, Charlie22 wrote: > > > yes, that is what I said..not working, so I have to replace any > > scripts. I thought that "#menu li a" is regular CSS selector...or > > not??
[jQuery] Re: How select first link??
yes, that is what I said..not working, so I have to replace any scripts. I thought that "#menu li a" is regular CSS selector...or not?? On 17 Led, 20:23, jQuery Lover wrote: > Interesting but it [ $('#menu li a:first') ] does not work in 1.3 !!! > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Sun, Jan 18, 2009 at 12:18 AM, Charlie22 wrote: > > > hmm, it seems as my stupidity :-) so there is no need use element > > in this case. Originally I had code $('#menu li a:first'), but it > > works only under 1.2.6, not under 1.3 Am I correct? > > > On 17 Led, 20:09, jQuery Lover wrote: > >> Exactly, just like I wrote!!! > > >> > $('#menu a:first').remove(); > > >> > >> Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > >> On Sun, Jan 18, 2009 at 12:05 AM, Nic Luciano > >> wrote: > >> > The reason it's not working is you're using the first-child selector. > >> > What > >> > you're doing by using that is selecting every anchor that is the first > >> > parent of it's child (which is all of them since they lie immediately > >> > under > >> > a list item). The selector you want to be using is just first (a:first), > >> > which will return the first matched element on the document only. > > >> > Cheers- > >> > Nic > >> >http://www.twitter.com/nicluciano > > >> > On Sat, Jan 17, 2009 at 1:56 PM, Charlie22 wrote: > > >> >> IE7, FF3, GoogleChrome..ok, check this page > >> >>http://83.240.47.84/skyrace2/del.html > > >> >> On 17 Led, 19:41, jQuery Lover wrote: > >> >> > What browser are you using? I am using firefox 3.0.5 and jquery 1.3 > >> >> > and it is working!!! > > >> >> > I have just triple checked... > > >> >> > $('#menu a:first').remove(); > > >> >> > removes the first anchor in the list. > > >> >> > > >> >> > Read jQuery HowTo Resource - http://jquery-howt.o.blogspot.com > >> >> >.
[jQuery] Re: How select first link??
hmm, it seems as my stupidity :-) so there is no need use element in this case. Originally I had code $('#menu li a:first'), but it works only under 1.2.6, not under 1.3 Am I correct? On 17 Led, 20:09, jQuery Lover wrote: > Exactly, just like I wrote!!! > > > $('#menu a:first').remove(); > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Sun, Jan 18, 2009 at 12:05 AM, Nic Luciano wrote: > > The reason it's not working is you're using the first-child selector. What > > you're doing by using that is selecting every anchor that is the first > > parent of it's child (which is all of them since they lie immediately under > > a list item). The selector you want to be using is just first (a:first), > > which will return the first matched element on the document only. > > > Cheers- > > Nic > >http://www.twitter.com/nicluciano > > > On Sat, Jan 17, 2009 at 1:56 PM, Charlie22 wrote: > > >> IE7, FF3, GoogleChrome..ok, check this page > >>http://83.240.47.84/skyrace2/del.html > > >> On 17 Led, 19:41, jQuery Lover wrote: > >> > What browser are you using? I am using firefox 3.0.5 and jquery 1.3 > >> > and it is working!!! > > >> > I have just triple checked... > > >> > $('#menu a:first').remove(); > > >> > removes the first anchor in the list. > > >> > > >> > Read jQuery HowTo Resource - http://jquery-howt.o.blogspot.com > >> >.
[jQuery] Re: How select first link??
IE7, FF3, GoogleChrome..ok, check this page http://83.240.47.84/skyrace2/del.html On 17 Led, 19:41, jQuery Lover wrote: > What browser are you using? I am using firefox 3.0.5 and jquery 1.3 > and it is working!!! > > I have just triple checked... > > $('#menu a:first').remove(); > > removes the first anchor in the list. > > > Read jQuery HowTo Resource - http://jquery-howt.o.blogspot.com >. > > > On Sat, Jan 17, 2009 at 11:33 PM, Charlie22 wrote: > > > of i add .remove() of course > > > On 17 Led, 19:32, Charlie22 wrote: > >> I tested it, but it remove all "a", so sry, it doesnt work :-( > > >> On 17 Led, 19:21, jQuery Lover wrote: > > >> > Removing li solves the problem: > > >> > $('#menu a:first'); > > >> > > >> > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > >> > On Sat, Jan 17, 2009 at 11:09 PM, Charlie22 wrote: > > >> > > Hi all, I am playing with jQuery 1.3 and I have provlem with selecting > >> > > a first link in code below. Can you help me how how it should look > >> > > like jQuery code and also for case, if Home will not be a link, so > >> > > "Rules" will be a first link. My traditional way from jQuery 1.2.6 > >> > > doesnt work now. ('#menu li a:first') > > >> > > Thx for help in advance. > > >> > > > >> > > > >> > > Home > >> > > Rules > >> > > Pilots > >> > > Briefing > >> > > IGC > >> > > Results > >> > > Forum > >> > > > >> > > - Skrýt citovaný text - > > >> > - Zobrazit citovaný text -- Skrýt citovaný text - > > >> - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: How select first link??
of i add .remove() of course On 17 Led, 19:32, Charlie22 wrote: > I tested it, but it remove all "a", so sry, it doesnt work :-( > > On 17 Led, 19:21, jQuery Lover wrote: > > > > > Removing li solves the problem: > > > $('#menu a:first'); > > > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > On Sat, Jan 17, 2009 at 11:09 PM, Charlie22 wrote: > > > > Hi all, I am playing with jQuery 1.3 and I have provlem with selecting > > > a first link in code below. Can you help me how how it should look > > > like jQuery code and also for case, if Home will not be a link, so > > > "Rules" will be a first link. My traditional way from jQuery 1.2.6 > > > doesnt work now. ('#menu li a:first') > > > > Thx for help in advance. > > > > > > > > > > Home > > > Rules > > > Pilots > > > Briefing > > > IGC > > > Results > > > Forum > > > > > > - Skrýt citovaný text - > > > - Zobrazit citovaný text -- Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] Re: How select first link??
I tested it, but it remove all "a", so sry, it doesnt work :-( On 17 Led, 19:21, jQuery Lover wrote: > Removing li solves the problem: > > $('#menu a:first'); > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > > > On Sat, Jan 17, 2009 at 11:09 PM, Charlie22 wrote: > > > Hi all, I am playing with jQuery 1.3 and I have provlem with selecting > > a first link in code below. Can you help me how how it should look > > like jQuery code and also for case, if Home will not be a link, so > > "Rules" will be a first link. My traditional way from jQuery 1.2.6 > > doesnt work now. ('#menu li a:first') > > > Thx for help in advance. > > > > > > > Home > > Rules > > Pilots > > Briefing > > IGC > > Results > > Forum > > > > - Skrýt citovaný text - > > - Zobrazit citovaný text -
[jQuery] How select first link??
Hi all, I am playing with jQuery 1.3 and I have provlem with selecting a first link in code below. Can you help me how how it should look like jQuery code and also for case, if Home will not be a link, so "Rules" will be a first link. My traditional way from jQuery 1.2.6 doesnt work now. ('#menu li a:first') Thx for help in advance. Home Rules Pilots Briefing IGC Results Forum
[jQuery] Re: jQuery 1.3 selector :first; :first-child
code: Home Rules Pilots Briefing IGC Results Forum On Jan 17, 2:40 pm, jQuery Lover wrote: > Just checked. Works just fine. > > Maybe something wrong in your html? Could you paste it here? > > > Read jQuery HowTo Resource - http://jquery-howto.blogspot.com > > On Sat, Jan 17, 2009 at 6:26 PM, Charlie22 wrote: > > > Hi all, > > I have trouble in jQuery 1.3 with :first; :first-child selector. > > Always it selects all "a". In version 1.2.6 it worked by suspense. > > What is new or wrong?? Thx for help. > > > $(function(){ > > $('#menu li a:first-child').remove(); > > });
[jQuery] jQuery 1.3 selector :first; :first-child
Hi all, I have trouble in jQuery 1.3 with :first; :first-child selector. Always it selects all "a". In version 1.2.6 it worked by suspense. What is new or wrong?? Thx for help. $(function(){ $('#menu li a:first-child').remove(); });
[jQuery] jQuery (1.2.6) $.ajax and IE7 problem
Hi all, I have probelm with these pages http://83.240.47.84/skyrace2 under FF3 menu rules and submenu works fine, but under IE7 it is loosing data. What is wrong there? scripts: Menu: $(function(){ $("ul#menu li a:first").addClass('active'); $("ul#menu li a").click(function(){ $("ul#menu li a:only-child").removeClass('active'); $(this).addClass('active'); var href = $(this).attr('href'); $('#obsah>*').remove(); $.ajax({ url: href, success: function(html){ $('#obsah').append(html); } }); return false; }); }); Submneu: $(function(){ $('#menu2 li a:first').addClass('active2'); $('#rkontys>*').css('display','none'); $('#rGeneral').css('display',''); $('#menu2 li a').click(function(){ var href1=$(this).attr('href'); //$('#obsah>*').remove(); $('#menu2 li a:only-child').removeClass('active2'); $(this).addClass('active2'); $('#rkontys>*').css('display','none'); $('#'+href1).css('display', ''); if (href1=='complete'){ $('#rkontys>*').css('display', '')}; return false; }); });
[jQuery] jQuery (1.2.6) and IE7 problem
Hi all, I have problem with these pages, check menu "Rules" and then submenu for rules. Under FF3 it works OK, but under IE7 it lost data from cache or what. Deos can somobody help me. Thx in advance. jQuery codes Menu: $(function(){ $("ul#menu li a:first").addClass('active'); $("ul#menu li a").click(function(){ $("ul#menu li a:only-child").removeClass('active'); $(this).addClass('active'); var href = $(this).attr('href'); $('#obsah>*').remove(); $.ajax({ url: href, success: function(html){ $('#obsah').append(html); } }); return false; }); }); Submenu: $(function(){ $('#menu2 li a:first').addClass('active2'); $('#rkontys>*').css('display','none'); $('#rGeneral').css('display',''); $('#menu2 li a').click(function(){ var href1=$(this).attr('href'); //$('#obsah>*').remove(); $('#menu2 li a:only-child').removeClass('active2'); $(this).addClass('active2'); $('#rkontys>*').css('display','none'); $('#'+href1).css('display', ''); if (href1=='complete'){ $('#rkontys>*').css('display', '')}; return false; }); });