Click here to Skip to main content
15,899,025 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
i am using j query model('show') for pop up 

in pop up i need to scroll bar to specific elem id 

currently happening for page scroll but scroll is not happening for pop up box
i tried following scenarios
both are not working


What I have tried:

1) . $('.model-content').animate({

scrollTop: $("#model_idX").offset().top

}, 2000);



here model_idX is dynomic ID
div " model-content" will appear in POpUP

now i want to scroll within popup(not in page) to specific ID
say model-id6


my HTML PAGE something looks like beow


<html>
<body>









</body>
<html>
Posted
Updated 31-Jul-16 20:59pm
v5
Comments
Karthik_Mahalingam 28-Jul-16 10:11am    
what about focus method?
Member 8785407 29-Jul-16 1:54am    
i need to scroll poup not window
here focus does't work i think
Karthik_Mahalingam 29-Jul-16 1:56am    
focus will work, but you will not get the scrolling animation
Member 8785407 29-Jul-16 3:35am    
PLEASE LET ME KNOW THE CODE
if there is no scrolling its Ok
but i need to point to that "model-id" at least
Richard Deeming 28-Jul-16 14:30pm    
Hard to answer without seeing your markup, but passing the same ID to both jQuery calls is definitely wrong. The first call needs the ID of the scrolling container, and the second call needs the ID of the element you want to scroll to.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900