Jquery Onclick Href

A simple jquery script which is used to create the link without an anchor tag.

Features

  • Simple script to open a link in new window.
  • Responsive and easy to integrate into your web pages.
  • Supports all modern browsers.

Preview

Jquery Onclick Href Script

Hscripts.com

Downloads


<!--Scripts by hscripts.com-->
<!--More scripts @ www.hscripts.com-->
<script type='text/javascript'>
$(document).ready(function(){

$('.href').click(function() {
$link=$(this).attr('ref');
if ($link!="") {
window.open($link,'_blank')
}


});

});
</script>



  • Release Date - 09-04-2015
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to support@hscripts.com

Usage

  • Copy and paste the code in your <head> tag and save it in .html extension.
  • Give classname as 'href' and place the link in the ref attribute in the desired tag.
    For Example : <div class='href' ref='https://www.hscripts.com'>Hscripts.com</div>
  • Now run the file in your browser.
  • To run the code, "jquery.js" file is necessary.
  • Download this jquery.js file and include it in your head tag.

License

  • This Jquery code is given under GPL License
  • i.e. Free use for those who use the codes as it is.
  • Free, if your modification does not remove our copyright information and links.
  • Detailed License information can be found here.
  • You can purchase the script if your requirements does not meet our GPL License terms.

Related Scripts

Jquery Download


Ask Questions

Ask Question