jQuery .html() not displaying any data in ie7, but ie8 works

So who doesn't have issues with ie7 ?

It seems that I cannot get ie7 to recognize some data.

I have created a wordpress theme for a client of mine, and this allows them to put in extra information in the wordpress meta fields through the admin so they can display extra info.

I have written a small jQuery script that looks at an images alt and title to gather this info and write it into a div.

Below is my script.

<script type="text/javascript">
    //<![CDATA[
    jQuery(document).ready(function(){
      var title = jQuery('.attachment-post-thumbnail').attr('title');
      var alt = jQuery('.attachment-post-thumbnail').attr('alt');
      jQuery('#vehicle-alt').html('<h2 class="car-detail">'+title+'</h2><p>'+alt+'</p>');
    });
    //]]>
</script>

When i look at the source code in ie7, there is no information that has been passed.

the div is as simple as

5
задан Kara 14 January 2014 в 15:48
поделиться