Implement jQuery element draggable() form Google Ajax Libraries API it simple just some lines of code take a look at livedemo.
Google host providing frequently used javascript files eg. jQuery, Mootools, Dojo. Use google.load() to speedup your website loading.
Google host providing frequently used javascript files eg. jQuery, Mootools, Dojo. Use google.load() to speedup your website loading.
Download Script Live Demo
Javascript Code
Contains google ajax api code loading jquery form libraries google.load();
<script src="http://www.google.com/jsapi?key=AB">
</script>
<script type="text/javascript" >
google.load("jquery", "1");
google.load("jqueryui", "1");
function OnLoad(){
$('#content').html('<div id="drag-div" ">' +
'<div id="dragme"></div></div>');
$("#drag-div").draggable({
}
google.setOnLoadCallback(OnLoad);
</script>
<body>
<div id="content">Loading...</div>
</body>
</script>
<script type="text/javascript" >
google.load("jquery", "1");
google.load("jqueryui", "1");
function OnLoad(){
$('#content').html('<div id="drag-div" ">' +
'<div id="dragme"></div></div>');
$("#drag-div").draggable({
"handle": "div"
});}
google.setOnLoadCallback(OnLoad);
</script>
<body>
<div id="content">Loading...</div>
</body>
CSS Code
#dragme
{width:229px;
height:129px;
background:url(dragmelogo.png) no-repeat;
border:4px solid #666666
}
Related post:
Perfect Javascript Form Validation using Regular Expressions.
Change the title.
ReplyDeletedoesn`t work in IE8...(?)
ReplyDelete