javascript - SyntaxError: Unexpected end of input (Probably missing brace) -
i'm on bug since 2 days, , eyes can't find glitch ... think i've missed brace somewhere, did test none concluant. hope have better eyes me find glitch ...
here script. i've used jquery making animations block , adapt height of page. nothing special !
var jq = jquery.noconflict(); jq(document).ready(function () { var m = 0; var ss = 0; var w = jq(window).width(); var h = jq(window).height(); jq("#blshufflesong").css("width", w + 'px'); jq("#blmg").css("width", w + 'px'); jq("#blproject").css("width", w * 2 + 'px'); var cd = 0; if (h < 585) { h = 585; } // anti-bleuark jq("#showmg").click(function () { if (ss == 1 && cd == 0) { shufflesongtomg(); } else if (m == 0 && cd == 0) { showmg(); } else if (m == 1 && cd == 0) { hidemg(); }; }) jq("#showshufflesong").click(function () { if (ss == 1 && cd == 0) { hideshufflesong(); } else if (m == 1 && cd == 0) { mistergladtoshufflesong(); } else if (m == 0 && cd == 0) { showshufflesong(); }; }) jq("#showmg").click(function () { if (m == 0 && cd == 0) { jq("#leftpro").css("left", w + 'px'); jq("#leftpro").animate({ left: '10px' }, 800, 'easeinoutquint'); } }); // jq(".linkfrancais").click(function(){ // hmove = h * 0.60; // jq("#home").animate({margintop: hmove+'px'}, 500); // }); function showmg() { m = 1; cd = 1; jq("#ineedtoseemoarprojectdawg").animate({ height: h + 'px' }, 300); jq("#blproject").css("marginleft", w + 'px'); jq("#blockmg").css("display", "block"); jq("#blproject").css("display", "block"); jq("#blproject").animate({ marginleft: '0px' }, 700, 'easeinoutquint'); next(1000); } function showshufflesong() { ss = 1; cd = 1; jq("#ineedtoseemoarprojectdawg").animate({ height: h + 'px' }, 300); jq("#blproject").css("marginleft", w + 'px'); jq("#blockshufflesong").css("display", "block"); jq("#blockmg").css("display", "block"); jq("#blproject").css("display", "block"); jq("#blproject").animate({ marginleft: '-' + w + 'px' }, 700, 'easeinoutquint'); next(1000); } function mistergladtoshufflesong() { m = 0; ss = 1; cd = 1; jq("#blockshufflesong").css("display", "block"); jq("#blproject").animate({ marginleft: w + 'px' }, 700, 'easeinoutquint', function () { jq("#blockmg").css("display", "block"); }); next(700); } //braces won't closed @ point function shufflesongtomg() { ss = 0; m = 1; cd = 1; jq("#blockmg").css("display", "block"); jq("#blproject").animate({ marginleft: '0px' }, 700, 'easeinoutquint', function () { jq("#blockshufflesong").css("display", "none"); }); next(700); } function hidemg() { m = 0; cd = 1; jq("#blproject").animate({ marginleft: w + 'px' }, 700, 'easeinoutquint', function () { jq("#blockmg").css("display", "none"); jq("#blproject").css("display", "none"); jq("#ineedtoseemoarprojectdawg").animate({ height: '315px' }, 300); }); next(1000); } function hideshufflesong() { ss = 0; cd = 1; jq("#blockmg").css("display", "block"); jq("#blproject").animate({ marginleft: w + 'px' }, 1400, 'easeinoutquint', function () { jq("#blproject").css("display", "none"); jq("#blockshufflesong").css("display", "none"); jq("#blockmg").css("display", "none"); jq("#ineedtoseemoarprojectdawg").animate({ height: '315px' }, 300); }); next(1700); } function next(t) { settimeout(function () { cd = 0 }, t); } function getsize(c) { var w = jq(window).width(); var h = jq(window).height(); var hp = 0; var wp = 0; if (h < 500) { hp = 500 + 'px' } else { hp = h + 'px'; } jq("#lefirstpage").css("height", hp); if (w < 990) { wp = 990 + 'px' } else { wp = w + 'px'; } jq("#lefirstpage").css("width", wp); if (c == 1) { jq("#topcontainer").css("height", h * 0.40); }; hbc = h * 0.60; hbc = hbc - 140; hbc = hbc / 2; if (c == 1) { jq("#bottomcontainer").css("padding", hbc + 'px 0px'); }; } }
all animation function worked before i've add latest feature consist adapt height of blocks.
thanks want me (and others took time read this)
you missing );
@ end of script:
jq(document).ready(function () { ... });
hope helps!
Comments
Post a Comment