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
<ul>
 <li>Test Test Test </li>
<li>Test Test Test </li>
<li class="last">Test Test Test </li>
</ul>

so li.last and li:last equal the same thing

Thanks for all the info so far
-------------------
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:
http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323

MainWebsite: http://alexd.adore.ro
Portofolio: http://alexd.adore.ro/project_page.php


On Thu, Feb 12, 2009 at 6:38 PM, MorningZ <morni...@gmail.com> wrote:

>
> "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 <alex.d.a...@gmail.com>
> wrote:
> > 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.asp?transcriptid=1879053
> > CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619
> > RentACoder Profile:
> http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf...
> >
> > MainWebsite:http://alexd.adore.ro
> > Portofolio:http://alexd.adore.ro/project_page.php
> >
> > On Thu, Feb 12, 2009 at 5:40 PM, MorningZ <morni...@gmail.com> wrote:
> >
> > > For the first part of your post
> >
> > > li:last   gets the last <li> in the given <ul>
> >
> > > li.last   gets any <li> 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 <alex.d.a...@gmail.com> wrote:
> > > > Why does this :
> >
> > > > $(document).ready(function(){
> >
> > > >     if($(".leftNav ul li:last").height() < 32){
> > > >         $(".leftNav ul li.last").addClass("lastWithItems");
> >
> > > >     }
> >
> > > > })
> >
> > > > work in 1.3.1 but not this
> >
> > > > $(document).ready(function(){
> >
> > > >     if($(".leftNav ul li.last").height() < 32){
> > > >         $(".leftNav ul li.last").addClass("lastWithItems");
> >
> > > >     }
> >
> > > > })
> >
> > > > (Notice the li.last on both lines) ??? Also why isnt it explained
> > > anywhere
> > > > :(
> >
> > > > Another thing
> >
> > > > why cant i do this
> >
> > > > function blabla() {
> >
> > > > }
> >
> > > > $(document).ready(blabla()) ?
> >
> > > > and i have to do $(document).ready(function(){})
> >
> > > > From what i recall i could do both things in 1.2.6, now with 1.3.1
> those
> > > > seem to be impossible, also why isnt there any mention on the Jquery
> > > > doc/tutorial pages? :(
> >
> > > > 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:
> > >http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf.
> ..
> >
> > > > MainWebsite:http://alexd.adore.ro
> > > > Portofolio:http://alexd.adore.ro/project_page.php
>

Reply via email to