I trying to hide the 'New' button on Contacts page(https://na15.salesforce.com/003/o). I trying with the jQuery code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script><script>
$j = jQuery.noConflict();
$j(document).ready(function hideButton(){
var url = window.location.href;
var tabUrl = "https://na15.salesforce.com/003/o";
alert('hello taburl is' +tabUrl);
if(url.indexOf(tabUrl) !== -1)
{
var newBtn = $j('[name="new"]');
newBtn.css({"white-space":"normal","display":"none"});
}
});
</script>
I have pasted this code at Home Page Components. but, it didn't worked.
name
new. Anyways, you do not seem to be calling thehideButton();
function anywhere?