I have this simple script:
$(document).ready(function(){ var $yoyo = window.location.hash; alert($yoyo); });
But I need to get rid of the # symbol as I'll be using the variable to locate div ids. I've tried using .remove('#') but that doesn't seem to be working.
Many thanks in advance!
OTHER WORDS FOR eliminate 1 do away with, banish, abolish, eradicate, erase, exterminate, cut out, annihilate, weed out, stamp out, rub out. 2 throw out, exclude, drop, delete, except.
HR, WORKPLACE. to force someone to leave an important job or a position of power, usually because they have behaved badly, or in a way that you do not approve of: They initiated the procedure for him to be removed from office.
1a : to change the location, position, station, or residence of remove soldiers to the front. b : to transfer (a legal proceeding) from one court to another. 2 : to move by lifting, pushing aside, or taking away or off remove your hat. 3 : to dismiss from office.
var $yoyo = window.location.hash.substring(1);
This simply means we're taking a substring consisting of character 1 (0-indexed, so second) onwards. See the substring docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With