• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

link inside another link?

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you can't embed actual links (<a> elements) within other links. But you can certainly have event handlers at different levels on elements that can be nested. You need to be careful what the inner link is doing as it can prevent the event from propagating upwards in the DOM.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Well, you can't embed actual links (<a> elements) within other links. But you can certainly have event handlers at different levels on elements that can be nested. You need to be careful what the inner link is doing as it can prevent the event from propagating upwards in the DOM.


Cool, so I have to do it without a links and just javascript and events. If the inner is clicked I actually don't want the outer to fire. Basically, it will be a list of users which you can click on any and invite as friends. But inside the user info is their twitter account name that you can click on and it will go to Twitter in another tab/window, so if you click the twitter link, I don't want to send a friend request in that case.

Thanks again for you help.

By the way, in my aboutus (funny us as in just me) I mention you and Eric.

Mark
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a screenshot of the aboutus

Mark
aboutus.png
[Thumbnail for aboutus.png]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic