Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-26-2011, 08:04 PM   PM User | #1
Jacobb123
Regular Coder

 
Join Date: Aug 2006
Posts: 311
Thanks: 0
Thanked 1 Time in 1 Post
Jacobb123 has a little shameless behaviour in the past
Scroll an image with jQuery

I am trying to scroll an image with jquery from one point to another with jQuery

I am using the following code but cannot seem to get it to work

PHP Code:
var pos $window.scrollTop(); //position of the scrollbar
var windowHeight $window.height(); //get the height of the window

function test(startPosendPosscrollPoswindowHeight)
    {
        
        var 
obj = $('#ios');
        var 
position obj.position();
        
console.log(position.top +  (startPos endPos)/ (scrollPos/100))
        return (
position.top +  (startPos endPos)/ (scrollPos/100))
    
    }

$ios.css({'top':test(500120poswindowHeight) }); 
Nothing moves though. Can anyone give me a hint. TO be honest I am so turned around I don't know if I am anywhere close anymore
Jacobb123 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:23 AM.


Advertisement
Log in to turn off these ads.