Mazen Elkashef
Mazen Elkashef

Reputation: 3499

Hide/Show Panels inside the Repeater Item Template using JavaScript

I added a (Read More...) Div to my repeater's item template, that doesn't contain any information.

I want to add a text button or an anchor to my item template..when it's clicked it should call a javascript method that writes information to the Div and it will take the content to write as a parameter, the content will be passed as an Eval method, for example it will eval("education")...and when it's clicked again it will hide the Div

I tried various and near approaches but it all worked outside the repeater and item template tags, but if I placed the identical code to the repeater and my javascript to the head tag it won't function!

I don't want to post my code, because I'm sure it's an easy and essential trick for any developer...so I was hoping for an original example not an edit to my test code(beginners logic)! =)

Thanks in advance!

Upvotes: 0

Views: 1745

Answers (1)

gafda
gafda

Reputation: 98

Try the jQuery UI Accordion. It works well with the asp:Repeater.

Upvotes: 1

Related Questions