Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is the example Javascript code
- $('h1,h2,h3,h4,h5,h6').each(function(i,e) {
- try {
- var hash = ">"+$(e).first().text().replace(/[^a-zA-Z\ ]/g,'').replace(/\ /g,'_');
- $(e).attr('title','Double click to get the URL for this point on the page: #'+hash);
- $(e).attr('id',hash);
- $(e).dblclick(function() {
- window.location.hash = hash;
- })
- } catch(e) {
- }
- })
Add Comment
Please, Sign In to add comment