is there way save current page bookmark (through jquery or otherwise) when specific button clicked?
<script language="javascript" type="text/javascript"> $(document).ready(function(){ $("a.jquerybookmark").click(function(e){ e.preventdefault(); // prevent anchor tag going user off link var bookmarkurl = this.href; var bookmarktitle = this.title; if (window.sidebar) { // mozilla firefox bookmark window.sidebar.addpanel(bookmarktitle, bookmarkurl,""); } else if( window.external || document.all) { // ie favorite window.external.addfavorite( bookmarkurl, bookmarktitle); } else if(window.opera) { // opera browsers $("a.jquerybookmark").attr("href",bookmarkurl); $("a.jquerybookmark").attr("title",bookmarktitle); $("a.jquerybookmark").attr("rel","sidebar"); } else { // other browsers not support alert('your browser not support bookmark action'); return false; } }); }); </script> this code taken developersnippets!
/e:
chrome not support such actions, since security level broken.
Comments
Post a Comment