Note that there are some explanatory texts on larger screens.

plurals
  1. POManipulating hidden div's
    text
    copied!<p>Ok, so i have a few <code>&lt;div1&gt;</code> elements with static content inside of them. Then if you hover over the <code>&lt;div1&gt;</code> another <code>&lt;div2&gt;</code> pops up over top of it. (note: how this happens is the "display" property changes from "none" to "block") This <code>&lt;div2&gt;</code> has data that is relevant to <code>&lt;div1&gt;</code>. It populates dynamically based on the <code>&lt;div1&gt;</code> that you over on.</p> <p>These <code>&lt;div&gt;</code> elements i do not have access to manipulate. What i am trying to do is create a JQuery script that says if <strong><em>this</em></strong> particular data is populated into the <code>&lt;div2&gt;</code> than manipulate it in <strong><em>this</em></strong> way.</p> <p>Could someone please help me with this? I would greatly appreciate it. Thanks!</p> <p>If you have any questions or anything please let me know!</p> <p>EDITED: Ok, here is what i have... <code>&lt;div id="model-rotator-form"&gt;</code> is the div that stays hidden until you hover over an "li", then it displays with dynamic content.</p> <p>Within this <code>&lt;div&gt;</code> is an H2 element that holds the vehicle name, a UL element that holds two link images, and a bunch of other elements that i'm not trying to change.</p> <p>The H2 element is <code>&lt;h2 class="model-name"&gt;Vehicle Name&lt;/h2&gt;</code> and the UL element is <code>&lt;ul class="link-btn"&gt;&lt;li&gt;&lt;a class="linkBtn" href="Model.aspx?d=711" id="model-rotator-link-1"&gt;Research&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="linkBtn" href="/Dallas/For-Sale/New/Volkswagen/Jetta SportWagen/" id="model-rotator-link-2"&gt;Inventory&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</code></p> <p>My code right now doesn't work i know...this is just a reference point... <code>$('#model-rotator-form *'); if($('$h2.model-name').length() &gt;= 25){ $('ul.link-btn').css('margin-top','-20px'); }</code></p> <p>Let me know what i can do. Again...hope this code helps.</p>
 

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