IE7, IE8 and IE9 can have issues with certain jQuery functions, one of these is the .remove() function. One (and probably) the only solution I’ve found is to always use an ID or Class selector.

Basically, to solve the issue, simply use a  id or class selector and not a tag.

 

The IE Problem

Below is an example of code which will NOT WORK.

 

$(this).find('canvas').remove();

$('div').remove();

$(this).find('span').remove();

 

The above code does not work because ‘canvas’, ‘div’ and  ‘span’ are all tags.

 

The IE Solution

Below is a solution of what does work

 

$(this).find('#blur-hide').remove();

$('.img:first-child').remove();

$(this).find('.cat').remove();

 

Enjoy.



View More Tutorials

See more posts on tutorials.

Wordpress, PHP, JavaScript, jQuery, CSS, HTML, MYSQL and more!

Categorised As:The Internet, Tutorials
COMMENTS