We help IT Professionals succeed at work.

How to find a Div nexted in a RadPanelBar

Medium Priority
520 Views
Last Modified: 2012-05-12
Hello Experts,

I have a RadPanelBar with 3 RadPanelItems.  On the second Item I have 2 div's that are set to display:none.  

When I click on a link, 1 or the other is set to display:block.

When I leave the second item, to got to the 1st or the 3rd and then come back to the second, the div is hidded again.

Is there a way to keep it display:block.

Thanks

Howard
Comment
Watch Question

CERTIFIED EXPERT
Commented:
Go ahead with jQuery.

First thing you have to bind click event for each dom element on which after clicking you need to display respective DIV.

for this see:

http://api.jquery.com/bind/

eg code is;

$('#foo').bind('click', function() {
  //alert('User clicked on "foo."');
  //here you have find that particular div with jQuery selectors. see: http://api.jquery.com/category/selectors/
});

eg. you can try thisL

$(this).find("div:first").css('display', 'block');

this will work iff div which you want to show is inside the container on which you are clicking.

hope this helps you.

also pl share your code so that i give you exact solution.
leakim971Multitechnician
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:

Explore More ContentExplore courses, solutions, and other research materials related to this topic.