Note that there are some explanatory texts on larger screens.

plurals
  1. POMake elements draggable within an iframe
    primarykey
    data
    text
    <p>I have an iframe within one of my webpages. It points to another page on the same domain. I've been trying to make the elements draggable within it and I'm having trouble. I got it working last night but make some changes before saving that version and now can't figure out how I had it before so I know it can be done. I have the iframe highlighting elements right now but when I put the code to drag and drop in as I had it before, it doesn't work. The code in the main page is:</p> <pre><code>function init() { var $head = $("#myframe").contents().find("head"); $head.append($("&lt;link/&gt;", { rel: "stylesheet", href: "http://ajax.googleapis.com /ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css", type: "text/css" })); $head.append($("&lt;link/&gt;", { rel: "javascript", href: "http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js", type: "text/javascript" })); $head.append($("&lt;link/&gt;", { rel: "javascript", href: "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js", type: "text/javascript" })); $head.append($("&lt;link/&gt;", { rel: "stylesheet", href: "my_styles.css", type: "text/css" })); } function iframeLoad() { $head.append($("&lt;link/&gt;", { rel: "javascript", href: "my_js.js", type: "text/javascript" })); } </code></pre> <p>My code for the jquery to drag and drop is:</p> <pre><code> $(document).ready(function() { $("p").draggable(); }); $(document).ready(function() { $("h1").draggable(); }); $(document).ready(function() { $("div").draggable(); }); </code></pre> <p>The url is: <a href="http://johnverber.com/Opti/url.html" rel="nofollow">http://johnverber.com/Opti/url.html</a> in case you want to see it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload