Removing an Element on Certain Location
Posted
by Chicken Soup
on Stack Overflow
See other posts from Stack Overflow
or by Chicken Soup
Published on 2010-03-29T06:13:46Z
Indexed on
2010/03/29
6:23 UTC
Read the original article
Hit count: 239
jQuery
|JavaScript
Let's say the window's location is on htt://stackoverflow.com/index.php
, I want to remove an element in the index page with jQuery. This is what I have and it's not working:
$(document).ready(function() {
var location = window.location;
var locQuery = /index/i;
if (location.match(locQuery)) {
$('.someClass').removeClass();
}
});
© Stack Overflow or respective owner