jQuery if has this in the url remove everything from a div

If you’re on

http://site.com/something/whatever-in-the-url/something-else/

Find, “#this-div” and remove everything in it.

$(function() {
    if ( document.location.href.indexOf('whatever-in-the-url') > -1 ) {
		$('#this-div').remove();
    }
});