Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery Accordion Buried in a Table within Dynamic Page
    primarykey
    data
    text
    <p>I'm trying to access the Moveover property of an Accordion buried under Divs and other stuff. Here is the HTML:</p> <pre><code>&lt;body&gt; &lt;form id="form1" runat="server" &gt; &lt;div id="content" class="content"&gt; &lt;table style="width: 1200px"&gt; &lt;tr&gt; &lt;td style="width: 800px"&gt; &lt;h1&gt;Title here&lt;/h1&gt;&lt;br /&gt; stuff here.. blah blah.. &lt;div id="wrapping" class="wrapping"&gt; &lt;p class="accordionButton"&gt;&lt;strong&gt;Water-Related Services&lt;/strong&gt;&lt;/p&gt; &lt;div class="accordionContent"&gt; Item 1&lt;br /&gt; Item 2&lt;br/&gt; Item 3&lt;br /&gt; &lt;/div&gt; &lt;p class="accordionButton"&gt;&lt;strong&gt;Fire and Smoke Problem&lt;/strong&gt;&lt;/p&gt; &lt;div class="accordionContent"&gt; Item 1&lt;br /&gt; Item 2&lt;br /&gt; Item 3&lt;br /&gt; &lt;/div&gt; &lt;p class="accordionButton"&gt;&lt;strong&gt;Mold Problems&lt;/strong&gt;&lt;/p&gt; &lt;div class="accordionContent"&gt; Mold Remediation&lt;br /&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;td style="width:auto; text-align:center"&gt; &lt;p style="text-align:center; font-size:xx-large; color:Red"&gt;CALL TODAY&lt;/p&gt;&lt;br /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; </code></pre> <p> </p> <p>Here is the portion of the script I'm using to TRY to access the Accordion buttons:</p> <pre><code> $('.wrapping').find('p.accordionButton').mouseover(function() { $('div.accordionContent').slideUp('normal'); $(this).next().slideDown('normal'); }); </code></pre> <p>I've placed an ALERT command inside the Mouseover function and it never fires, so I know I'm not reaching the Accordion button properly. Can anyone help?</p> <p><strong>Added</strong>: Here is the entire JQuery script. It's not big, but it's redundant. I have this ASP.NET page as a dynamic web page. I know I have redundancies, but I'm new at JQuery:</p> <p>// Check for hash value in URL<br> var hash = window.location.hash.substr(1);</p> <pre><code>var href = $('#nav li a').each(function(){ var href = $(this).attr('href'); if(hash==href.substr(0,href.length-4)){ var toLoad = hash + '.htm #content'; $('#content').load(toLoad) } }); </code></pre> <p>$(document).ready(function() { </p> <pre><code> //ACCORDION BUTTON ACTION $('.wrapping').find('p.accordionButton').mouseover(function() { $('div.accordionContent').slideUp('normal'); $(this).next().slideDown('normal'); }); //HIDE THE DIVS ON PAGE LOAD $(".accordionContent").hide(); if (hash=="") { $('#content').load("welcome.aspx #content", showNewContent()); } $('#nav li a').click(function(){ var toLoad = $(this).attr('href')+' #content'; $('#content').hide('fast',loadContent); $('#wrapper').append('&lt;span id="load"&gt;LOADING...&lt;/span&gt;'); $('#load').fadeIn('normal'); function loadContent() { $('#content').load(toLoad,'',showNewContent()) } function showNewContent() { $('#content').show(hideLoader()); } function hideLoader() { $('#load').fadeOut('normal'); } return false; }); function loadContent() { $('#content').load(toLoad,'',showNewContent()) } function showNewContent() { $('#content').show(hideLoader()); } function hideLoader() { $('#load').fadeOut('normal'); } </code></pre> <p>}); </p>
    singulars
    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.
 

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