Looking for an advice from javascript expert

Can u edit your links html when u adding them into ur site? I wrote something like that for myself. U need to add additional attribute with ref data inside ur link.
 
Can u edit your links html when u adding them into ur site? I wrote something like that for myself. U need to add additional attribute with ref data inside ur link.


Hi there, This will probably be easier.

Code:
$('a').click(function (e) { e.preventDefault; window.location = "Youreurl" })


not sure how much JS or web development you know but basically e.preventDefault stops from going to the URL that was referenced, window.location sends them to the page specified by quotes. All of this is wrapped in the .click jquery function. I put ('a') as the selector but you can select whatever tag you want like this: $('#id'). the id in this case is the id associated with whatever you're clicking on, you can add it to the html. Hope this helped, DM me if you need more help.
 
Last edited:
Back
Top