javascript - Draggable and clickable at same time -


I need some help. How can I do this on an iPad? I need to allow a group of pictures that are attached to a different file during each click. Dracing is working now but image links are not. Now, if a comment initTouch ();, the image link will work, I want to draw links and draw to work together.

Example:

  & lt; Head & gt; & Lt; Link rel = "stylesheet" href = "Page2.css" /> & Lt; Link rel = "stylesheet" href = "jquery.ui.all.css" & gt; & Lt; Script src = "jquery-1.10.2.js" & gt; & Lt; / Script & gt; & Lt; Script src = "jquery.ui.core.js" & gt; & Lt; / Script & gt; & Lt; Script src = "jquery.ui.widget.js" & gt; & Lt; / Script & gt; & Lt; Script src = "jquery.ui.mouse.js" & gt; & Lt; / Script & gt; & Lt; Script src = "jquery.ui.draggable.js" & gt; & Lt; / Script & gt;  

  & lt; Meta charset = "utf-8" & gt; & Lt; Script & gt; $ (Function () {$ (document) .ready (function () {initTouch ();}) $ ("#draggable") .druggable ({handle: "p.ui-widget-header"}); $ $ ("#draggable") .draggable ({cursor: "crosshair"}); $ ("#draggable"). Druggable ({prevention: "none"});  

/ / These two lines of code are not currently working as long as I delete the first line after the word function //

  $ ("# image2"). Wrap ('& Lt; a href = "ratecard.html" target = "_ blank" & gt; & lt; / a & gt; '); $ ("# image3"). Wrap (' & lt; a href = 'reason 2 .html "target =" _ blank "> gt; & lt; / a & gt; ';);); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "primary container" class = "primary container cleanfix" & gt; & Lt; Div id = "box" class = "clearfix" & gt; & Lt; / Div & gt; & Lt; Div id = "box1" class = "clearfix" & gt; & Lt; / Div & gt; & Lt; P id = "text" & gt; & Lt; Span id = "effects" & gt; Commercial & lt; / Span & gt; & Lt; Br / & gt; & Lt; / P & gt; & Lt; Div id = "wood" class = "clearfix" & gt; & Lt; Div id = "draggable" class = "ui-widget-content" & gt; & Lt; P class = "ui-widget-header" & gt; & Lt; Img id = "image" src = "img / movie1_01.png" square = "image" /> gt; & Lt; / P & gt; & Lt; Img id = "image1" src = "img / film1_02.png" square = "picture" /> & Lt; Img id = "image2" src = "IMG / Film 1_03.png" square = "picture" /> & Lt; Img id = "image3" src = "img / movie1_04.png" square = "image" /> & Lt; Img id = "image4" src = "img / movie1_05.png" square = "picture" /> & Lt; Img id = "image5" src = "img / movie1_06.png" square = "picture" /> & Lt; Img id = "image6" src = "img / movie1_07.png" square = "image" /> & Lt; / Div & gt; & Lt; / Div & gt; & Lt; P id = "text1" & gt; & Lt; Span id = "textspan1" & gt; Drag a film strip and select the video you want to see. & Lt; / Span & gt; & Lt; Br / & gt; & Lt; / P & gt; & Lt; / Div & gt; & Lt; / Body & gt;   

Since drag - event Is said only if the element is actually transferred. On mouseup : check that the draggable drag event was applied, and if not, then click Take Action. / P>

  var dragInvoked = false; $ ("#draggable"). Druggable ({drag: function () {dragInvoked = true;}}); $ ("# Dragable") MousePow (function () {if (! Siren was gone) {doClickAction ();} got done = wrong;});  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -