Solved

Getting Repeater Item in Jquery

Posted on 2010-08-28
2
866 Views
Last Modified: 2013-11-11
Hi Experts

I do have a repeater and a link within the repeater in that for collapsing/expanding the repeater items.I want to collapse the respective div when the link is clicked. How do i get the id of the div when the link is clicked,i mean if i click the repeater second item link i want the div id of second row.
0
Comment
Question by:manishk1111
2 Comments
 
LVL 15

Accepted Solution

by:
SRigney earned 500 total points
Comment Utility
Do you have some html you can post to help out?

You should be able to attach to the links and get the id of the parent div. like this. if the links in the repeater have a class of repeaterLinks.

$(".reapeaterLinks").click(function() {
  $link = $(this);
  // get the closest parent that is a div then get it's id.
  $link.parents("div").attr(*id");
});
0
 

Author Closing Comment

by:manishk1111
Comment Utility
Solution was partially helpful.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
There are a couple ways to attach a JavaScript function to dynamically created elements. You can make a new script for each element as it’s created or you can use delegation. Delegation allows a single script that is added at page creation to mat…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now