Solved

Getting Repeater Item in Jquery

Posted on 2010-08-28
2
873 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
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 …
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

726 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