jquery - Attach a JavaScript function to a standard link that would handle the request? -


On my page I have several DIVs related to the same category and with the automatically generated links by the flow doc There are small statements for @mants).

Is not a user to redirect any other URL, instead of calling on that function instead of calling on that link, which will filter the statements given on that page, will show only The Dietary Div in which @Myt was clicked?

Here's an example:

  & lt; Div class = 'entry' data-hashtag = '# supermarket # feed # alcohol' & gt; & Lt; P & gt; #supermarkets #food and #lcohol and lt; A title = "search @ personal" category = "app-tag-link" href = "/ context / @ personal" & gt; @ Private & lt; / A & gt; & Lt; / P & gt; & Lt; / Div & gt;  

The user clicks on private and instead of going to context / personal / a javascript function is said to filter the DIV via jQuery, as it is.

Thank you for your help!

Of course - you want to add the listener to the link and call < Pre> element.addEventListener ('click on', without using the function)

(e) {e.preventDefault (); // filter}); Using jQuery:

   

  // jQuery object element The selected group of (s) keeps JQueryObject.on ('click', function (e) {e.preventDefault (); // filter});  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -