/ Published in: jQuery
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
$(document).ready(function(){
$("a.fav").click(function(e){
e.preventDefault();
var bookmarkUrl = this.href;
var bookmarkTitle = this.title;
if (window.sidebar) { //for firefox
window.sidebar.addPanel(bookmarkTitle, bookmarkUrl,"");
} else if( window.external || document.all) { //for IE
window.external.AddFavorite( bookmarkUrl, bookmarkTitle);
} else if(window.opera) { // for Opera
$("a.fav").attr("href",bookmarkUrl);
$("a.fav").attr("title",bookmarkTitle);
$("a.fav").attr("rel","sidebar");
} else {
alert('Your browser dont support');
return false;
}
});
});
Comments
 Subscribe to comments
                    Subscribe to comments
                
                