I want to use jquery to edit the class margin properties if its on homepage or admin, for instance , i am using class breadcrumb
.breadcrumb{margin-top:10px;margin-left:20px;}
What I want is to find the current url which is I think done by using:
var pathname = window.location.pathname;
After getting the current path I need to check if its admin page or home page or common pages, so for common page , the margin-left should be 15px , while for home and admin page the margin-left should be 20px
Admin page url: www.mydomain.com/admin
home page url: www.mydomain.com
other pages url: www.mydomain.com/......
Can anyone help me how to achieve this , or is there any better way of doing this, Any help or assistance will be highly appreciated