Image Scrolling just like http://www.porterwright.com/

Posted by Sharadgupta2110 under jQuery on 11/3/2010 | Points: 10 | Views : 1419 | Status : [Member] | Replies : 2
Hello All,

I want to implement image scrolling on click link button, and automatic scrolling with in the fix time interval in my new sites just like
http://www.porterwright.com/ .
Please let me know, is there any way in Flash or JQuery to scrolling image.

thanks in advance..

Sharad

Sharad Gupta


Responses

Posted by: Lalji_mer on: 11/3/2010 [Member] Bronze | Points: 25

Up
0
Down
try this code
[code]
<style type="text/css">
#divBottom{position:absolute; visibility:hidden; font-family:arial,helvetica; height:20; width:100; font-size:12pt; font-weight:bold}
</style>
<script type="text/javascript" language="JavaScript">
/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at www.bratta.com
Visit for more great scripts. This may be used freely as long as this msg is intact!
I will also appriciate any links you could give me.
********************************************************************************/
//Default browsercheck, added to all scripts!
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()
/********************************************************************************
Remeber to set the look of the divBottom layer in the stylesheet (if you wan't
another font or something)
********************************************************************************/

/*Set these values, gright for how much from the right you wan't the layer to go
and gbottom for how much from the bottom you want it*/
var gright=170
var gbottom=40


/********************************************************************************
Constructing the ChangeText object
********************************************************************************/
function makeObj(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+"document.layers." +obj):0;
this.moveIt=b_moveIt;
}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}

/********************************************************************************
Initilizing the page, getting height and width to moveto and calls the
object constructor
********************************************************************************/
function geoInit(){
oGeo=new makeObj('divBottom')
pageWidth=(bw.ie4 || bw.ie5)?document.body.offsetWidth-4:innerWidth;
pageHeight=(bw.ie4 || bw.ie5)?document.body.offsetHeight-2:innerHeight;
checkIt()
//sets the resize handler.
onresize=resized
if(bw.ie4 || bw.ie5) window.onscroll=checkIt;
//shows the div
oGeo.css.visibility='visible'
}
/********************************************************************************
This function executes onscroll in ie and every 30 millisecond in ns
and checks if the user have scrolled, and if it has it moves the layer.
********************************************************************************/
function checkIt(){
if(bw.ie4 || bw.ie5) oGeo.moveIt(document.body.scrollLeft +pageWidth-gright,document.body.scrollTop+pageHeight-gbottom)
else if(bw.ns4){
oGeo.moveIt(window.pageXOffset+pageWidth-gright, window.pageYOffset+pageHeight-gbottom)
setTimeout('checkIt()',30)
}
}
//Adds a onresize event handler to handle the resizing of the window.
function resized(){
pageWidth=(bw.ie4 || bw.ie5)?document.body.offsetWidth-4:innerWidth;
pageHeight=(bw.ie4 || bw.ie5)?document.body.offsetHeight-2:innerHeight;
if(bw.ie4 || bw.ie5) checkIt()
}


//Calls the geoInit onload
if(bw.bw && !bw.ns5) onload=geoInit;

//Here we will write the div out so that lower browser won't see it.
if(bw.bw && !bw.ns5) document.write('<div id="divBottom">www.bratta.com</div>')
</script>

[/code]

more info
------
http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/

LP MER

Sharadgupta2110, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sharadgupta2110 on: 11/3/2010 [Member] Starter | Points: 25

Up
0
Down
Thanks for reply but this code is not working,
Please help me..

Sharad Gupta

Sharadgupta2110, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response