Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I saw this

JavaScript
$('document').ready(function() {
         $(document).scroll(function(){
         if(document.documentElement.clientHeight + 
         $(document).scrollTop() >= document.body.offsetHeight )$(document).scrollTop(0);
         });
      }); 

And I was wondering if I can get it changed to loop the scrollbar only in my select element?

Like THIS site does with the whole site but.... only with the element select element that I have

Thanks in advance :3
Posted
Comments
Karthik_Mahalingam 28-Apr-15 14:28pm    
you mean, if we scroll it to a particular control/element it should trigger the event ?
Risenwolf 29-Apr-15 14:23pm    
Like the site I linked to does. Where the scrollbar starts over. Basically, I want the scrollbar to go in a circle :)

1 solution

Hi Risenwolf, Are you looking for same behaviour of scroll in a particular div instead of having scroll on whole page.
I made one fiddle for you please check it out.

https://jsfiddle.net/bharatuiet/aksud8ye/[^]
 
Share this answer
 
v2

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