Solved

Getting Repeater Item in Jquery

Posted on 2010-08-28
2
870 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
ID: 33549416
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
ID: 33710324
Solution was partially helpful.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
This article discusses how to create an extensible mechanism for linked drop downs.
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)

808 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