Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Href in a div, i want to action on the whole div ?

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to explain my problem a little better then last time , my A href only fires when im over the actuel text "my href text", i want to fire my A href i the whole div element, is this possible ?



Frank
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just like the answer in the last post, you need to put the event handler on the div. SO somehow you need to programmatically or manually add the event handler.

Eric
 
Frank Jacobsen
Ranch Hand
Posts: 358
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dident get an answer on my last post ! But i dident understand the answer:

you need to put the event handler on the div !

I have tryed with an mouse over on the div element, its that what you mean, i have tried to make :

<div onmoouseover="do something">
<div>
< a href "do my href">
</div>
</div>

But there is no mouse over on the whole div, only on the tekst, so where else can i put it ?

Frank
 
Justin Fox
Ranch Hand
Posts: 802
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just add onclick event to the div like so...



Hope this helps you out a bit,

Justin Fox
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64185
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But there is no mouse over on the whole div, only on the tekst, so where else can i put it ?
I have no idea what you mean by "tekst" or by this statement.
 
Frank Jacobsen
Ranch Hand
Posts: 358
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks thats helped me a lot, im only have one problem know, my o nmouseover with the a href have a "hand" when i put the courser in the area where the text is , but the rest off the td i call okay my javasctipt onclick, but there is no hand, is it possible to solve that problem too ?

Frank
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add css to the div, set the cursor to pointer.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic