Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
- <script src="jquery.ui.core.js"></script>
- <script src="jquery.ui.widget.js"></script>
- <script src="jquery.ui.mouse.js"></script>
- <script src="jquery.ui.draggable.js"></script>
- </head>
- <body>
- <div class="two-one last">
- <h2>Recent Work</h2>
- <ul class="recent">
- <li class="image">
- <img src="a.jpg">
- <a href="b.jpg" class="link">View</a>
- </li>
- <!-- more li here -->
- </ul>
- </div>
- <script>
- var link = $('.link');
- link.click(function()
- {
- var big_image_url = $(this).attr('href');
- var big_img = $('<img id="draggable">').attr('src', big_image_url);
- big_img.load(function()
- {
- $("body").prepend(big_img);
- $('#draggable').draggable();
- });
- return false; // To prevent a href from working
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment