Results 1 to 1 of 1

Thread: auto scroll on mousemove?

  1. #1
    Join Date
    Oct 2011
    Hamilton, Ontario

    auto scroll on mousemove?

    trying to get this to auto scroll when the mouse moves past a certain point.. the #mousepos element constantly updating mouse position works fine but I can't get the scroll to work.. what am I missing? is there a parameter for 'scrollright()' that i am missing

    here's my code:
                    $('#prev').mousemove(function (e){
                        var x = e.pageX - this.offsetLeft;
                        var y = e.pageY - this.offsetTop;
                        if (x>=1200){
                       $('#mousepos').html(x +', '+ y);
       <div id='prev'>
                <td align='center'><img src='mypics/tmp5pic3.jpg' />TITLE</td>
                <td align='center'><img src='mypics/tmp5pic4.jpg' />TITLE</td>
                <td align='center'><img src='mypics/tmp5pic5.jpg' />TITLE</td>
                <td align='center'><img src='mypics/tmp5pic6.jpg' />TITLE</td>
    if have also tried replacing the '$('#prev').scrollRight();' with 'var divscroll=setTimeout(scrolldiv(), 50);' and then adding
    function scrolldiv(){

    but to no avail
    Last edited by thewebiphyer; 04-17-2013 at 04:32 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center