Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
4
Answers
Explain this query
Ankit Shukla
9y
539
1
Reply
Hi,
Can anyone explain this query?
<script>
$(function() {
var pgurl = window.location.href.substr(window.location.href.lastIndexOf("/")
+1
);
$(".menu li a").each(function() {
if ($(this).attr("href") == pgurl || $(this).attr("href") == '')
$(this).addClass("active");
});
});
</script>
and why we add '1' in 3rd line (highlight with red color)?
Thanks in advance.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
Sort particular records in jquery datatable asp.net mvc.
how to add bootstrp jquery in vs2013