Note that there are some explanatory texts on larger screens.

plurals
  1. POappend() not working in safari but works in IE6
    primarykey
    data
    text
    <p>I having trouble getting <code>append()</code> to work in safari for some reason, but it works fine in IE6 !! The problem I have got is <code>$( "#newsList .newsItemHeading" ).each(function(){})</code> and <code>$( "#newsList .newsListItem" ).each(function(){})</code> is not working. I tried displaying the content in the <code>&lt;ul id="newsList"&gt;</code> in safari in an alert box,it was returning blank. </p> <p>Its just that iam not able to access the elements in jquery i have added using the apend(),but the elements are picking the CSS style perfectly.Am i missing somethin here? Or should i be using some other technique? </p> <p>Html:</p> <pre><code>&lt;html&gt; &lt;div class="news-container"&gt; &lt;ul id="newsList"&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/html&gt; </code></pre> <p>jQuery:</p> <pre><code>$.ajax({ url: 'news.htm', type: 'GET', dataType: 'html', success: function(data){ var $content = $(data).find('.newsItemContent'); $content.each(function(){ var li = $("&lt;li&gt;"+"&lt;div class=newsItemHeading&gt;"+$(this).children("h1").text()+"&lt;/div&gt;"+"&lt;div class=newsListItem&gt;"+$(this).clone().children("h1").remove().end().text()+"&lt;/div&gt;"+"&lt;/li&gt;"); $("#newsList").append(li); }); } }); $( "#newsList .newsItemHeading" ).each(function(){ $(this).bind('click', function() { window.location.href='news.htm'; }); }); $( "#newsList .newsListItem" ).each(function(){ $(this).html($(this).html().substring(0,135)+'&lt;a href="news.htm"&gt;...&lt;/a&gt;'); }); </code></pre> <p>If the question is not clear enuf,please let me know.i cud provide more details if needed so it makes it easier to understand what the problem is</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.
    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