Note that there are some explanatory texts on larger screens.

plurals
  1. POMoving a DOM Element in jQuery (Layer Slider)
    primarykey
    data
    text
    <p>jQuery noob here. Sorry if the question is really simple, I haven't been exposed to much jquery, though I am trying to learn. </p> <p>I am attempting to move a DOM Element from one place to another, but I seem to be running into some errors. </p> <p>When I attempt to test to see if the DOM exists I get indications that the element is not in the DOM: </p> <pre><code>if (jQuery('.ls-yourlogo').length) { alert('Found!'); } else { alert('NOT FOUND!'); } </code></pre> <p>I am trying to move <strong>.ls-yourlogo</strong> into <strong>.ls-inner</strong>. </p> <p>I have tried several different things including: </p> <pre><code>jQuery('#layerslider_1').children('img').appendTo('#layerslider_1').children('.ls-inner'); </code></pre> <p>also </p> <pre><code> jQuery('.ls-yourlogo').appendTo('.ls-inner'); </code></pre> <p>I do know that the <strong>.ls-yourlogo</strong> and the <strong>.ls-inner</strong> DOM elements are both created with jQuery. I'm not sure if that is what is causing the problem. </p> <p>I am currently working with the Layer slider plugin for WordPress: <a href="http://codecanyon.net/item/layerslider-responsive-wordpress-slider-plugin-/1362246" rel="nofollow">http://codecanyon.net/item/layerslider-responsive-wordpress-slider-plugin-/1362246</a> </p> <pre><code> &lt;div id="slider"&gt; &lt;script type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt;&lt;/script&gt; &lt;div class="ls-wp-fullwidth-container" style="height: 317px;"&gt; &lt;div class="ls-wp-fullwidth-helper" style="height: 317px; width: 1349px; left: 0px;"&gt; &lt;div id="layerslider_1" class="ls-wp-container ls-container ls-noskin" style="width: 1050px; height: 317px; margin: 0px auto; visibility: visible;"&gt; &lt;div class="ls-webkit-hack"&gt;&lt;/div&gt; &lt;div class="ls-inner"&gt; &lt;div class="ls-layer ls-active"&gt; &lt;img class="ls-s-1"&gt; &lt;p &gt;&lt;/p&gt; &lt;p &gt;&lt;/p&gt; &lt;/div&gt; &lt;div class="ls-layer" &gt; &lt;img class="ls-s-1"&gt; &lt;/div&gt; &lt;div class="ls-circle-timer"&gt;&lt;/div&gt; &lt;div class="ls-loading-container"&gt;&lt;/div&gt; &lt;div class="ls-thumbnail-wrapper"&gt;&lt;/div&gt; &lt;div class="ls-shadow"&gt;&lt;/div&gt; &lt;img class="ls-yourlogo"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p> </p> <p>Thank you for your time. </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