jeudi 19 décembre 2013

Using JQuery + EasyDrag to Move Elements or Images by Clicking on Them

This is one way to make your site more interactive so that readers can "play" with certain elements of the page being able to drag from one side to another within the container in which they are, i.e. can drag the images with a script that will allow them to move from one place to another within the blog.
Demo

You can see an example in this test blog

To create this effect on images


Login to your Blogger account, go to Template and click the Edit HTML button:


Click anywhere inside the template's code and press the CTRL + F keys to search for this tag:
Just before paste the following scripts:
Change the URL of the image where is indicated, and furthermore, it is important that each image has a unique ID, in this example the ID is called easeydrag1, that ID must be twice.

If you have another picture with this effect, then you should put a different image with other ID, for example easydrag2, otherwise it will not work:

And how do you do if you want to put a link to the image?

We will set one Javascript function, so that when we will double click on it to open the page we want.

In this case, the code you would use, would be this:
link-URL')" src="image-URL" />
With this the picture can be without any problems dragged around and can be activated by double clicking on its link.

Libellés : , ,

0 commentaires:

Enregistrer un commentaire

Abonnement Publier les commentaires [Atom]

<< Accueil