Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-07-2012, 11:59 AM   PM User | #1
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
Jquery parent div

Hi im tying to get the parent of the current element and then navigate down to a inner div, but I can't get any lower that the first div even if I do parent('div div')
__________________

nikos101 is offline   Reply With Quote
Old 05-07-2012, 12:22 PM   PM User | #2
webgrid
New to the CF scene

 
Join Date: May 2012
Location: Norway :)
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
webgrid is an unknown quantity at this point
Smile

Quote:
Originally Posted by nikos101 View Post
Hi im tying to get the parent of the current element and then navigate down to a inner div, but I can't get any lower that the first div even if I do parent('div div')
You can try $(this).closest('div'); or $(this).parents("div:first");
webgrid is offline   Reply With Quote
Old 05-07-2012, 12:33 PM   PM User | #3
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
No luck

Div parent
-------Button calling
--------Div I keep getting
--—-----------Inner div I want
__________________

nikos101 is offline   Reply With Quote
Old 05-07-2012, 12:54 PM   PM User | #4
nikos101
Senior Coder

 
nikos101's Avatar
 
Join Date: Dec 2006
Location: London
Posts: 1,004
Thanks: 58
Thanked 10 Times in 10 Posts
nikos101 is an unknown quantity at this point
I managed to do it with the chilDren thing. Do you know how I would apply a function to a level 1 button and not to level 2 button (in another div)?
__________________

nikos101 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:18 AM.


Advertisement
Log in to turn off these ads.