asked on
<script type="text/javascript">
$(function(){
$('#gr_mwc_editworkoutsicons1').click(function(){
alert('cardio');
});
});
$(function(){
$('#gr_mwc_editworkoutsicons2').click(function(){
alert('strength');
});
});
$(function(){
$('#gr_mwc_editworkoutsicons3').click(function(){
alert('flex');
});
});
$(function(){
$('#gr_mwc_editworkoutsicons4').click(function(){
alert('balance');
});
});
$(function(){
$('#panelleft').load('https://www.myexerciserx.com/mfc_form_ep_desc3-leftpanel.asp?cur_day=5%2F16%2F2011', function(){
$('#panelleft').fadeIn(400);
$('#detailscreen').load('https://www.myexerciserx.com/mfc_form_ep_desc3-leftpanel2.asp?cur_day=5%2F16%2F2011');
});
$('#gr_mwc_arrowleft').click(function(){
if ($('#displayscreens').offset().top==149) {
$('#displayscreens').animate({top: '+=36px'}, 200);
$('#displayscreens').animate({top: '-=36px'}, 200);
} else {
$('#displayscreens').animate({top: '+=414px'}, 800);
}
});
$('#gr_mwc_arrowright').click(function(){
if ($('#displayscreens').offset().top==-2335) {
$('#displayscreens').animate({top: '-=36px'}, 200);
$('#displayscreens').animate({top: '+=36px'}, 200);
} else {
$('#displayscreens').animate({top: '-=414px'}, 800);
}
});
$("#gr_mwc_monthhead2").click(function(){
$("#gr_mwc_monthhead2").attr("src", "https://www.myexerciserx.com/art/gr_mwc_monthhead2.png");
$("#gr_mwc_monthhead3").attr("src", "https://www.myexerciserx.com/art/gr_mwc_monthhead3b.png");
$("#detailscreen").fadeOut(400);
});
$("#gr_mwc_monthhead3").click(function(){
$("#gr_mwc_monthhead2").attr("src", "https://www.myexerciserx.com/art/gr_mwc_monthhead2b.png");
$("#gr_mwc_monthhead3").attr("src", "https://www.myexerciserx.com/art/gr_mwc_monthhead3.png");
$("#detailscreen").fadeIn(400);
});
$('.dayblock').click(function(){
$('.dayblockhl').removeClass('dayblockhl');
$('.gr_mwc_monthblockarrowhl').removeClass('gr_mwc_monthblockarrowhl');
$(this).addClass('dayblockhl');
$(this).children('.gr_mwc_monthblockarrow').addClass('gr_mwc_monthblockarrowhl');
$('#panelleft').fadeOut(200);
$('#panelleft').load('https://www.myexerciserx.com/mfc_form_ep_desc3-leftpanel.asp?cur_day='+$(this).attr('id'), function(){
$('#panelleft').fadeIn(400);
});
});
$('.gr_mwc_dir').click(function(){
if ($(this).attr('src')="https://www.myexerciserx.com/art/gr_mwc_dirclosed.png") {
$(this).attr("src", "https://www.myexerciserx.com/art/gr_mwc_diropen.png");
} else {
$(this).attr("src", "https://www.myexerciserx.com/art/gr_mwc_dirclosed.png");
}
});
});
</script>
ASKER
ASKER
ASKER
$('.gr_mwc_dir').live('click', function(){
if ($(this).attr('src')=="https://www.myexerciserx.com/art/gr_mwc_dirclosed.png") {
$(this).attr("src", "https://www.myexerciserx.com/art/gr_mwc_diropen.png");
} else {
$(this).attr("src", "https://www.myexerciserx.com/art/gr_mwc_dirclosed.png");
}
});
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
there is an "=" missing in this line:
if ($(this).attr('src')="https://www.myexerciserx.com/art/gr_mwc_dirclosed.png") {
it should read
if ($(this).attr('src')=="https://www.myexerciserx.com/art/gr_mwc_dirclosed.png") {