Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting the pseudo elemente :before/:after working in IE 7
    primarykey
    data
    text
    <p>I am trying to get these to work in IE 7 but I am having problems. I downloaded and included the jQuery plugin for it in the header like this:</p> <pre><code>&lt;!--[if lte IE 7]&gt; &lt;script type="text/javascript" src="&lt;?php bloginfo('template_url'); ?&gt;/js/jquery.pseudo.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; </code></pre> <p>But it's still not working.</p> <p>Here is the code from the jQuery plugin..</p> <pre><code>(function($){ var patterns = { text: /^['"]?(.+?)["']?$/, url: /^url\(["']?(.+?)['"]?\)$/ }; function clean(content) { if(content &amp;&amp; content.length) { var text = content.match(patterns.text)[1], url = text.match(patterns.url); return url ? '&lt;img src="' + url[1] + '" /&gt;': text; } } function inject(prop, elem, content) { if(prop != 'after') prop = 'before'; if(content = clean(elem.currentStyle[prop])) { $(elem)[prop == 'before' ? 'prepend' : 'append']( $(document.createElement('span')).addClass(prop).html(content) ); } } $.pseudo = function(elem) { inject('before', elem); inject('after', elem); elem.runtimeStyle.behavior = null; }; if(document.createStyleSheet) { var o = document.createStyleSheet(null, 0); o.addRule('.dummy','display: static;'); o.cssText = 'html, head, head *, body, *.before, *.after, *.before *, *.after * { behavior: none; } * { behavior: expression($.pseudo(this)); }'; } })(jQuery); </code></pre> <p>I thought it might have something to do with having to change the <code>$</code> characters to <code>jQuery</code> since I am using WordPress and WP reserves the <code>$</code> character for prototype, but that didn't work either; it stopped the JS errors, but it still didn't work.</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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