Note that there are some explanatory texts on larger screens.

plurals
  1. POIE7 and jQuery .html / .empty / .css not firing
    primarykey
    data
    text
    <p>I have a page using a bunch of tables that are generated by a .NET repeater on page_load. These tables can have one of two classes: <code>fileExists</code> or <code>fileDoesNotExist</code>. On <code>document.ready</code>, I have the following:</p> <pre><code>$document.ready(function () { $('.fileDoesNotExist').each(function () { $(this).html("&lt;h3&gt;FILE #" + $(this).attr('id').replace('T', '') + ":&lt;/h3&gt;&lt;p&gt;&lt;a href=\"/cp/media-upload.aspx?seq=" + $(this).attr('id').replace('T', '') + "\"&gt;click here to upload an MP3 or video&lt;/a&gt;&lt;/p&gt;"); $(this).css('border', 'none'); }); }); </code></pre> <p>Which should affect this bit of HTML (there are more elements involved, but this is the basic gist):</p> <pre><code>&lt;table class="fileDoesNotExist" style="width: 100%;margin-top: 1em;" id="T1"&gt; &lt;tr&gt; &lt;th colspan="3"&gt;FILE 1&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Media Title:&lt;/td&gt; &lt;td colspan="2"&gt; &lt;input name="txtTitle" type="text" maxlength="255" size="50" id="txtTitle" /&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>This code fires fine in Chrome, Firefox, IE8 and IE9. When trying to view the page in IE7, it does all of nothing. I can replicate it in IE9 using IE7 standards for the document mode, and when trying to run the script directly in the console, it does all of nothing and returns no helpful error message.</p> <p>The <code>.each</code> is definitely properly firing (I replaced the <code>$(this).html</code> with <code>alert($(this).attr('id'));</code> and that spit out the IDs of the tables with the <code>fileDoesNotExist</code> class) but it seems that the html/css replacements just aren't taking.</p> <p>Is there something funky with IE7 (besides, you know, it being IE7) that I'm missing here? I looked through the suggested questions listed w/ my topic, but nothing seemed to touch upon .html or .css not firing at all.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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