SharePoint with Azzu Sheikh
Pages
Home
Java Script, JQuery & CSS
Tuesday, September 6, 2011
How to put a class on body tag in page.aspx created from master page
Below exercise is to add a particular class on body tag for a particular page.
use jquery:
var
url
=
location
.
search
;
if
(
url
.
indexOf
(
'/page-1.aspx'
)>=
0
)
{
$
(
'body'
).
addClass
(
'class1'
);
}
http://api.jquery.com/addClass/
Hope this helps...
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Loading...
Popular Posts
No comments:
Post a Comment