tags:

views:

34

answers:

3

Hi,

I'm just using a simple slideToggle function of jQuery. It works properly in my HTML file. But whenever I take codes into a ASP.NET WebForm project, script doesn't work. I can't achieve slide effect.

Is this a known issue? It's probably a popular mistake done by developers though. What could be the problem? Any possibilities?

(I didn't copy&paste any code because of I thought this is not a specific situation, but I can show codes if you want)

A: 

I'm guessing this is due to the unpredictable IDs of ASP.NET elements; there is fixed naming available in 4.0 (ClientID) - try using that with your #foo selectors? (where ClientID is set to "foo")

Marc Gravell
I'll check it, thank you.
scaryguy
Isn't unpredicable a bit hard since you can programatically get the real ID.
Rune FS
A: 

I think your code need proper ids for the control in Asp.Net pages .

So findout the Id details and make sure different.

Plz post ur code details.

Umakanta.Swain
A: 

Try using a class on the html element rather than using the id and update your selector to use the class.

tone