js achieve timing display pictures

Category: Web Develop
 
sdodonghai366
2010-02-19 04:28:08

Sponsored Links
The first graph shows out right then another ten seconds second graph shows, the first figure can still see,

just below this

ten seconds to display a show finished on OK


Sponsored Links

love123315696
2010-02-19 04:38:49
I would like to ask my drag this div code where a problem ah , ie in which normal, under the ff is stopped again and again to die, but if you add the div text on it, why is it so ah? experts advise.

<html> ;

<head>
<script language = "JavaScript" type = "text / javascript" src = "jquery-1.6.4.js" ;> </script>
<style>

</style>
</head>
<body>

<div id="rect" style="width:200px;height:200px;position:absolute;background-color:pink;">

</div>

<div id="display" style="position:absolute;top:300px;"> </div>
</body>
</html>

<script>

$ (init);

function init () {
rectEvent ();
}

function rectEvent () {
var slider = $ ("# rect");
var downFlag = false;

var offX;

slider.mousedown (function (e) {
downFlag = ; true;
var event = getEvent (e);
offX = getOffsetX (event);

});

slider.mouseup (function () {
downFlag = false;
});

slider.mouseout (function () {
downFlag = false;
});

slider.mousemove (function (e) {
var event = getEvent (e);

if (! downFlag) {
return false;
}

var left = event.clientX - offX;
$ ("# display"). text (left);
slider.css ("left", left);
});

}

function getEvent (event) {
var event = event? event: window.event;
return event;
}

function getOffsetX (event) {
var off_X = event.offsetX? event.offsetX: event.layerX;
return off_X ;
}

</script>

If I rect div casually adding text such as: 11, so that you can, and I have not quite understand Why is this so?
hqs37702
2010-02-19 04:58:15
I have a blog based on the location of the scroll bar to dynamically load images, you can take over, add a timer, the timer to regularly load images.
my blog:
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.