Note that there are some explanatory texts on larger screens.

plurals
  1. POjquery overlay doesn't fire on localhost
    primarykey
    data
    text
    <p>I'm trying to get a local testing environment sorted out and have successfully set up xampp to serve php pages. This is the first time I've done this so it's very possible I'm making newbie errors! </p> <p>However, I'm aware that javascript is clientside so the fact the jquery is being served by localhost shouldn't make any difference?</p> <p>I have a page with a jquery overlay and which works perfectly online - i.e., served by remote server. However, when I load the page locally served via xampp, firebug show me the following error:</p> <pre><code>$("#modifile_link[rel]").overlay is not a function [Break On This Error] onBeforeLoad: function() { </code></pre> <p>Here's the jquery call...</p> <pre><code>$(function() { // Setup a basic iframe for use inside overlays. var theframe = $('&lt;iframe class="iframe_style" frameBorder="0" scrolling="no"&gt;&lt;/iframe&gt;'); // Overlay $("#modifile_link[rel]").overlay({effect: 'apple', mask: { color: '#000000', loadSpeed: 1000, opacity: 0.6 }, closeOnClick: false, onBeforeLoad: function() { // grab wrapper element inside content var wrap = this.getOverlay().find(".contentWrap"); //Get the URL from the trigger var link = this.getTrigger().attr("href"); // load the page specified in the trigger $(theframe).attr({ src: link }); //Write the iframe into the wrap wrap.html(theframe); } }); }); </code></pre> <p>which is bound to this link...</p> <pre><code>&lt;div id="modifile_link" href="scripts/modifile/index.php" rel="#overlay_1"&gt;&lt;/div&gt; </code></pre> <p>and here's the html for the overlay...</p> <pre><code>&lt;div class="overlay_1" id="overlay_1"&gt; &lt;div class="overlay_content"&gt; &lt;div class="contentWrap"&gt;&lt;/div&gt; &lt;/div&gt;&lt;!-- end overlay content --&gt; &lt;/div&gt;&lt;!--end overlays html--&gt; </code></pre> <p>SO, it's seems strange that in firebug the jquery file is being loaded but the onBeforeLoad: function() is not being accepted. There's no ajax going on so I thought to rule out a cross domain security restriction? I don't know.</p> <p>Any pointers would be great.</p> <p>Thanks.</p> <p>Scott</p>
    singulars
    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.
 

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