I want to be able to run this script more than once without reloading the page. Have looked att using Live events, but couldn't figure it out. Any help would be greatly appreciated. Btw, I'm a noob and I haven't written the script myself.
<script type="text/javascript">
var $elem = $('#wrapper');
$(document).ready(function(){
$("a#trigger").click(function(event){
event.preventDefault();
var full_url = this.href;
var parts = full_url.split("#");
var trgt = parts[1];
var target_offset = $("#"+trgt).offset();
var target_top = target_offset.top;
$('html, body').delay(2000).animate({scrollTop:target_top}, 2000).delay(250).queue(function() {
$('#arm').hide();
$('#arm').toggleClass('arm-down');
});
});
$(function(){
$('#arm').hide();
$('#arm').toggleClass('arm-down');
$('a#trigger').click(function() {
$('#trigger').addClass('active');
$('#arm').delay(500).slideToggle().delay(750).queue(function() {
$('#arm').toggleClass('arm-grab');
});
});
});
});
</script>