[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Andy789
It was all my mistake, sorry. I had 2 clones of the same function and was editing a wrong one. everything works perfectly, all alerts etc Sorry, guys On Mar 18, 2:16 pm, Andy789 wrote: > OK, finally, I got it: everything was caused by qtip: adding a code > >    $j(this).qtip({ > >    content: $

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Andy789
OK, finally, I got it: everything was caused by qtip: adding a code $j(this).qtip({ content: $j(this).attr('title'), show: { effect: 'grow', length: 400 }, hide: { effect: 'grow', length: 400 }, position: { corner: { target: 'topMiddle', tooltip: 'bot

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Eric Garside
The problem here appears to be the change jQuery made with 1.3.2 with how it determines visibility. http://jsbin.com/omavi/edit That link is a quick demonstration of how it works. A "visible" object to jquery is determined by if it takes up space in the page, and has nothing to do with the css p

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Jonathan
Alerts work inside .each() just fine. There has to be another error in your code. I just copy and pasted that snippet into a new page and marked a a few LIs as jqtip and it worked perfectly. Are you positive there is nothing else inside the each() besides the alert? On Mar 17, 5:36 pm, Andy789

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread James
I don't see any issue with the code at all and can't help any further. I suggest stripping out other code (not disclosed here) and seeing what happens. If that's still no good, try posting a demo page that displays the issue. By the way, which web browser(s) are you using for this? Have your trie

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Andy789
No, just to make it real simple: function test(){ var vis = $j('li.jqtip:visible').length; alert(vis); //correct alert OK, returns some number here! $j('li.jqtip:visible').each(function() { alert('something here'); //nothing happens !!! }) } All alerts inside .each(function..

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread James
What happens if you remove the code for the qtip and leave the alert? On Mar 17, 10:14 am, Andy789 wrote: > Yes, this is what i was doing, but puzzled as why the second alert > never triggers: > > function tips(){ > alert($j('li.jqtip:visible').length); //returns 9 > $j('li.jqtip:visible').each(

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread Andy789
Yes, this is what i was doing, but puzzled as why the second alert never triggers: function tips(){ alert($j('li.jqtip:visible').length); //returns 9 $j('li.jqtip:visible').each(function() { alert('something here'); //returns nothing, but the function is working and creates tooltips !! $j

[jQuery] Re: Simple alert inside each(function.... not working

2009-03-17 Thread MorningZ
First, it would be wise to see what your selector returns function tips(){ alert($j('li.jqtip:visible').length); } if that returns "0", then your selector is wrong to help with that, there was this excellent post about breaking changes in 1.3.2 release, in your case reading the ":visible" s