Skip to main content

Bug Tracker

Side navigation

Ticket #6239: jquery_custom_tag.html

File jquery_custom_tag.html, 0.9 KB (added by Dark-Ape, March 07, 2010 09:34PM UTC)

Sample code example of the problem

  <title>Custom Tag Replacement</title>
  <script src="" type="text/javascript"></script>
<p>The below appears fine both in Firefox and Chrome, but not IE7 nor IE8.</p>
<jtag type="events" key="133"></jtag>
<script language="javascript">
  $(document).ready( function() {
    $("jTag").each( function(){
      var jTag = $(this);
      jTag.html('<a href=""><img src="" alt="Click here if this continues to load..." /></a>');
      var jTagUrl = "";
      var attrs = ['type', 'src', 'key', 'rand', 'desc', 'limit', 'more'];
      $.each(attrs, function(i,a) { if(jTag.attr(a)) jTagUrl += '&'+a+'='+jTag.attr(a); });
      jTag.load( jTagUrl, function() { jTag.replaceWith( jTag.html() ); } );

Download in other formats:

Original Format