I'm a newbie to javascript and jquery, and this bug has been hounding me for almost a day. Here's the code:
$('#txtTabContentsHeight', '#ddlTabContentsHeightRuler').blur(function () { //need to check ruler val first! var sruler = $('#ddlTabContentsHeightRuler').children("option").filter(":selected").text().toLowerCase(); var sval = $('#txtTabContentsHeight').val(); + '' + sruler; ChangeTabContentsCss(this, 'height'); }); I get a jquery error in my browser console on the $('#ddl...').^^children(... line. Even if I do a $('#ddlTabContentsHeightRuler').val(), I get the same error on the '.' of invalid or unexpected token.
I've checked every single similar discussion here and on the web for this kind of error, and it's always about a string issue, or a syntax issue. But for the life of me, I can't see a syntax problem here. The ddl element is a select element, obviously.
Can someone smack me upside the head with an answer?
$('#txtTabContentsHeight', '#ddlTabContentsHeightRuler')supposed to do? Did you mean$('#txtTabContentsHeight, #ddlTabContentsHeightRuler')?