when in my template I use a code like $("#mydiv").show(); to display an element, episerver automatically jump to the top of the page.
Is there any particular reason for that?
Do you mean that this code $("#mydiv").show(); jump to the top on the end user site view?
I used show function several time and never had this problem and I could be not related with EPiServer framework.
Could you provide more information:
- are you logged in to EPiServer when the problem appear (there is edit mode option in Top-Right corner)?
- where do you use show method - under button click or after document.ready?
the problem appears when in edit mode in EPiServer, I use the same page "outside" the cms and everything works fine.
There are no js errors and I use the show method after document ready.
I can reproduce the behavior even if I change manually the display attribute from none to block, or inline, with chrome dev tools.