Drag the gadget using Scriptaculous

10:08 AM

Sometimes you think you can use an add-pointer that pulled on his blog to a different location on the page? Is it possible or not? Why not c...

Sometimes you think you can use an add-pointer that pulled on his blog to a different location on the page? Is it possible or not? Why not create a procedure to reverse effects like that on the blog a bit. pull tricks help us add to blog a bit naughty and makes the game more enjoyable blog. To create this procedure, I have to use the Scriptaculous library. View   Demo . If you like this adversity and fitness tips, please follow the steps.

Step 1. Sign in Blogger, go to Design >> Edit HTML. Set before the </ head> with the following code.

<script src='http://www.google.com/jsapi'/>
< script>
google.load(&quot;prototype&quot;,&quot;1.6.0.3&quot;);
google.load(&quot;scriptaculous&quot;, &quot;1.8.2&quot;);
< /script>

Save Template


Step 2. Now you need to specify the id of an add HTML / JavaScript application that you want to pull tricks. For example, if you apply for that id utility HTML1 you to Page Elements, edit HTML1 id utility and placed in the context of utility with the following structure

<div id="HTML1" style="cursor:move; border:0px;">
Nội dung code tiện ích có id là HTML1
< /div>
< script type="text/javascript">new Draggable('HTML1');</script>

Similarly you can apply to other utilities with id as HTML2, HTML3, ...

No comments: