TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
deepa ashwi
NA
109
602.3k
how to put code from js fiddle in to my .master page
Dec 23 2013 2:14 AM
Hi friends,
after clicking a menu it should get highlighted (to show user in which page they are in)for this i used jquery and its working well in js fiddle but when i use the same in my .master page of my asp.net website highlight function is not working .i added
src="https:
//
ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
also but still not working can anyone tell me where im going wrong?
<pre lang="HTML">
//
css//
.
highlight
{
background-color
:green
; } #horizontalmenu
ul
{
padding
:1
;
margin
:1
;
list-style
:none
; } #horizontalmenu
li
{
float
:left
;
position
:relative
;
padding-right
:100
;
display
:block
;
border
:4px solid #CC55FF
;
border-style
:inset
; } #horizontalmenu
li:hover
{
float
:left
;
position
:relative
;
padding-right
:100
;
display
:block
;
border
:4px solid #CC55FF
;
border-style
:inset
;
background
:yellow
; } #horizontalmenu
li
ul
{
display
:none
;
position
:absolute
; } #horizontalmenu
li:hover
ul
{
display
:block
;
background
:red
;
height
:auto
;
width
:8em
; } #horizontalmenu
li
ul
li
{
clear
:both
;
border-style
:none
;}
<div id="horizontalmenu"> <ul> <li><a href="#">News
</
a
>
<
ul
>
<
li
>
<
a
href
="
#"
>
National
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
International
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Sport
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Hollybood
<
/
a
>
<
/
li
>
<
/
ul
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Technology
<
/
a
>
<
ul
>
<
li
>
<
a
href
="
#"
>
IT/Software
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Hardware
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Iphone
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Neuro-Science
<
/
a
>
<
/
li
>
<
/
ul
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Sports
<
/
a
>
<
ul
>
<
li
>
<
a
href
="
#"
>
Cricket
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Tenis
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Badminton
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Hockey
<
/
a
>
<
/
li
>
<
/
ul
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Country
<
/
a
>
<
ul
>
<
li
>
<
a
href
="
#"
>
India
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
America
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
France
<
/
a
>
<
/
li
>
<
li
>
<
a
href
="
#"
>
Pakistaan
<
/
a
>
<
/
li
>
<
/
ul
>
<
/
li
>
<
/
ul
>
<
/
div
>
//javascript// $('#horizontalmenu li').click(function(){ $('.highlight').removeClass('highlight'); $(this).addClass('highlight'); });
Reply
Answers (
9
)
Consuming WCF Service using Jquery
Approve multiple uses at once using Checkbox in knockout