User:Zache/vector.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
function move_fragment_to_first()
{
var hash = window.location.hash;
var props = hash.replace("#", "").split(",");
for (i = props.length-1; i >=0 ; i--) {
var prop=props[i].trim();
if (prop.match(/[MQPL][0-9]+/i))
{
$(window).scrollTop(0);
$('[id="'+ $.escapeSelector(decodeURIComponent(prop)) + '"]').prependTo($("#"+ prop).parent());
$("#"+ prop).css("border", "0.1em solid black");
}
}
}
$(move_fragment_to_first);