[jQuery] Re: New to JQuery, silly question.

2009-02-13 Thread Alexandru Dinulescu
Oh snap! Thanks ... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: h

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread Ricardo Tomasi
li:last and li.last are not the same element. li.last is the element, while li:last is giving you the *last* LI in the collection of *all* the LI's descending from ".leftNav ul" - that is the HAX element. Enforcing the child relationship should give you the expected results: $(".leftNav .menu

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread Alexandru Dinulescu
Here is the Link of the page in question. THIS WORKS: http://alexd.adore.ro/projects/threadsmith/getIdeas.html $(document).ready(function(){ if($(".leftNav ul li:last").height() < 32){ $(".leftNav ul li.last").addClass("lastWithItems"); } }) THIS DOESNT; http://alexd.adore.ro/pro

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread Ricardo Tomasi
I guess it's something else in your code that is going wrong. I just copied and pasted your JS and HTML and it works fine: http://jsbin.com/ibete http://jsbin.com/ibete/edit Can you post a test page like the one your working, showing this issue? Then I'm sure someone will spot the problem. chee

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread Liam Potter
Hi Alexandru, I cannot see any reason why li.last would not work, as it would be no different then selecting any li with any class. Alexandru Dinulescu wrote: So this should work right? function blabla() { } $(document).ready(blabla); --- Any info why the li:last and li.last do not work?

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread Alexandru Dinulescu
So this should work right? function blabla() { } $(document).ready(blabla); --- Any info why the li:last and li.last do not work? the html was something like this Test Test Test Test Test Test Test Test Test so li.last and li:last equal the same thing Thanks for all the info so far ---

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread MorningZ
"So all the parantheses are where they belong.." you should not use () in the document.ready line $(document).ready(blabla()) won't work $(document).ready(blabla) will work On Feb 12, 11:32 am, Alexandru Dinulescu wrote: > Also i didnt say this > > I said > function blabla() { > > > > >

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread Alexandru Dinulescu
Also i didnt say this I said function blabla() { > > } > > $(document).ready(blabla()) ? So all the parantheses are where they belong... --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread Alexandru Dinulescu
Yes but in that case the last element is the one with the .last classname so they are identical in meaning (they both refer to the same element) so why it's not working ? --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http:/

[jQuery] Re: New to JQuery, silly question.

2009-02-12 Thread MorningZ
For the first part of your post li:last gets the last in the given li.last gets any with the class of "last" For the second part of your post, your syntax is wrong $(document).ready(blabla) (note the lack of () after the function name) On Feb 12, 8:59 am, Alexandru Dinulescu wrote: