Forum Moderators: open
<!doctype html>
<html lang="en">
<head>
<title>jQuery UI Draggable - Revert position</title>
<link type="text/css" href="theme/ui.all.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="ui/ui.core.js"></script>
<script type="text/javascript" src="ui/ui.draggable.js"></script>
<style type="text/css">
#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
</style>
<script type="text/javascript">
$(function() {
$("#draggable").draggable({ revert: true });
});
</script>
</head>
<body>
<div class="content">
<div id="draggable" class="ui-widget-content">
<p>Your content here</p>
</div>
</div><!-- End content -->
</body>
</html>
Is it possible to put that script above or in front of slideshow script? So i can drag the text content to showing the Slideshow. Thank a lots and any help would be really appreciated. :)
This is the right place to ask this type of question. :)
Have you tried implementing that code? I'm not personally familiar with jQuery (more of a Prototype/Scriptaculous fan myself). If you are trying to have more than one effect on the same page you should be able to simply include both sets of code.
If however, you are trying to merge two different effects together, then it will take some coding to get it to all play nice together.
Hopefully someone with jQuery experience can chime in. :)
Thank you for your kind response.
Yes i'm trying to have more than one effect on the same page and already tried to implementing that code. Right now i have find a solution for that matter so this time the multiple effect were working properly although there is something weird happen on it. For that issues, i hope you can help me with that. Is it possible for me to put that code in this forum? in which the merge code were working properly but still need some touch in their code to work perfectly. If it is possible for me to put the two different code here, then i will put it immediately so we can share this code to make it more perfect in the distant future. Thank you for your kind attention and great consideration, will look forward to hear from you. :)
Lets say you have a div with the id "mypic1".
<div id="mypic1"></div>
In the script part of your page, use:
$("#mypic1").draggable( { options... });
Then you'd need a droppable target and in the code for it you could use the "drop: ..." option to tell the script what to do after the draggable is dropped.
$("mytarget1").droppable({
drop: function(event, ui) { // your code here });
});
I suggest reading through the Jquery UI docs about draggable and droppable.
See: [jqueryui.com...]
Yes i can put the JQuery in front of my slide show script as i already did in my last project. If you curious with that, please kindly open this url: <snip>
at there i put the slide script as a 'background' and then i put the JQuery draggable and droppable in front of it.
Please kindly check that url and i do really appreciate if you can help me to make that script more perfect.
Thanks a lots for your support.
[edited by: eelixduppy at 2:20 pm (utc) on Sep. 14, 2009]
[edit reason] no personal URLs, please [/edit]