chiprivers Posted September 6, 2010 Share Posted September 6, 2010 Hi, I am relatively new to javascript and an even newer user of jQuery, so please excuse me if I am missing something really simple here. I have the following jQuery script in my page: $('.status') .click( function(e) { var clicked = $(this).attr('id'); clicked = clicked.split('_'); var click_ff = clicked[1]; var click_start = clicked[2]; var click_end = clicked[3]; var res = $('#su_res').val(); if ($('#su_ff').val() == "") { // if there is no existing selection // set form values $('#su_ff').val(click_ff); $('#su_start').val(click_start); $('#su_end').val(click_end); console.log('happy thus far!'); } else if ($('#su_end').val() - $('#su_start').val() != res - 1 || click_ff != $('#su_ff').val()) { // if there is more than one cell selected or different ff clicked // clear previously selected range var shade_start = $('#su_start').val(); while (shade_start < $('#su_end').val()) { var shade_end = shade_start + res - 1; $('#_'+$('#su_ff').val()+'_'+shade_start+'_'+shade_end).removeClass('selected'); shade_start += res; } // set form values $('#su_ff').val(click_ff); $('#su_start').val(click_start); $('#su_end').val(click_end); } else { if (click_start < $('#su_start').val()) { // set new start value $('#su_start').val(click_start); } if (click_end > $('#su_end').val()) { // set new end value $('#su_end').val(click_end); } } // shade selected range var shade_start = $('#su_start').val(); while (shade_start < $('#su_end').val()) { var shade_end = shade_start + res - 1; $('#_'+$('#su_ff').val()+'_'+shade_start+'_'+shade_end).addClass('selected'); shade_start += res; } }); Firebug is reporting that 'selecter is not defined', but I don't know what this means or where my error is! Can anyone help? If you need any explanation as to what I am trying to do with this script, please let me know. Thanks. Link to comment https://forums.phpfreaks.com/topic/212636-jquery-selecter-not-defined/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.