Netcars provide cheap car loans and instant car finance online.
Great deals on car insurance from Direct Line
Save money - get a car insurance quote from privilege
adverts
 

Over the past couple of weeks I’ve stumbled over the same issue with jQuery a number of times. When you’re in an each loop within jQuery or some other reason when you’re using $(this), I continually have problems with finding and selecting a parent of $(this)

After a bit of searching, I’ve come across a lifesaver function built into jQuery. Closest()!

Quite simply…

$(this).closest('.class-name')

Seems to be working pretty good so far! :)

 
 

Don't forget Dazecoop

 
keep track of my tweets :)
 
For cheaper car insurance, there is only one place to go and that's Hastings Direct!

2 comments so far

  • Michele
    1 Oct 2009 at 3:50 pm

    tnx from a newbie :D

  • christmas gifts
    2 Dec 2009 at 6:42 am

    This function is working great with this j query development. I have been implemented this stuff in my project and it is beneficial for me. so thanks for this update.

What do you think?

 
wordpress
Theme by David Cooper :)