html - How to make pagination with Javascript? -


I am developing an endorsement for some site and I need to use Ajax to change the page, so I have to print the link "1", "2", "3" page, " , " with the tag that I want to click through this link Javascript event handler is required to add, but I do not need to go through that link, I just want to "1", " 2 "," 3 "is needed like a link What should I do? Is there a way to mark the digits like a link? How do I add javascript event handlers to click from links? Thank you in advance. Instead of inserting the tag

, simply & lt; Span & gt; Insert Tag. Br> give them a special category and then click with javascript.

Your HTML code can look like this:

  & lt; Span class = "my_link" & gt; 1 & lt; / Span & gt; & Lt; Span class = "my_link" & gt; 2 & lt; / Span & gt; & Lt; Span class = "my_link" & gt; 3 & lt; / Span & gt;   

In your CSS, you can put a link-style hand over the hover with the rule:

  .my-link {cursor: pointer}   

and after that, with JS and JQ, click

  & lt; Script type = "text / javascript" & gt; $ ('.my-link'). Click (function () {# your stuff ...}); & Lt; / Script & gt;    

Comments