KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to write a code for pagination. One function is to disable the current link so it looks like text and to be unclickable. In html page this could be achieved by omitting the href attribute like : <a>Link</a> I couldn't do that in javaScript, AvdonPagination.prototype.manageLinks = function(link){ if(link){ this.current.href = '#'; this.current = link; }else{ this.current = this.links[0]; } this.current.href = null; } because this.current.href = null; produces <a href="null">Link</a> Also I tried this.current.href="" , and this.current.disabled=true , but neither of them works. How I can achieve <a>Link</a> ?
Tags (comma-separated)
Save Edits
Cancel