Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in HTML CSS only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
HTML CSS
How to hyperlink a div using Jquery
How to hyperlink a div using Jquery
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
John Mathew
New Member
Join Date:
Nov 2011
Posts:
1
#1
How to hyperlink a div using Jquery
Nov 28 '11, 07:46 PM
I have a div like this:
<div id="test">sampl e test</div>
I need to hyper link the whole div using javascript or Jquery...
drhowarddrfine
Recognized Expert
Expert
Join Date:
Sep 2006
Posts:
7434
#2
Nov 28 '11, 08:04 PM
jQuery IS javascript and you don't need a big library like that just to do what you want. This is not the javascript board and you should ask there.
However, you should keep in mind that adding a link to a div is invalid in HTML4.01 and only recently made valid with HTML5.
Comment
Post
Cancel
Rabbit
Recognized Expert
MVP
Join Date:
Jan 2007
Posts:
12517
#3
Nov 28 '11, 08:53 PM
You mean
<a><div></div></a>
? Why do you need javascript for that?
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment