It is working like this:
$('.three').click(function(){
$(this).parent().parent().find('.threeB').eq($(this).index())
.css('background','green');
});
Check here: jsFiddle
More Related Contents:
- javascript change element from another page
- This doesn’t seem right? Javascript isn’t working
- Using jQuery to center a DIV on the screen
- jQuery: Get height of hidden element in jQuery
- Set timeout for ajax (jQuery)
- Trigger event when user scroll to specific element – with jQuery
- Using HTML5 file uploads with AJAX and jQuery
- Keep overflow div scrolled to bottom unless user scrolls up
- Why are duplicate ID values not allowed in HTML?
- jQuery Text to Link Script? [duplicate]
- How to do a horizontal scroll on mouse wheel scroll?
- How to load images dynamically (or lazily) when users scrolls them into view
- :touch CSS pseudo-class or something similar?
- Best JavaScript solution for client-side form validation and interaction? [closed]
- Clearing my form inputs after submission
- Multiple Select limit number of selection
- Check if element is between 30% and 60% of the viewport
- Is there any problem with using HTML5’s “data-*” attributes for older browsers?
- Fade background image in and out with jQuery?
- Trying to load local JSON file to show data in a html page using JQuery
- How to do something before on submit?
- Disable zoom on input focus in Android webpage
- how to use jQuery ajax calls with node.js
- Include html in another html file [duplicate]
- Wrapping lists into columns
- Close a SELECT dropdown list programmatically with Javascript/jQuery
- refresh div with jquery
- Jquery change text between two elements
- Remove everything within script and style tags
- Possible to reverse a css animation on class removal?