I am creating a very dynamic web application using a lot of Javascript to handle custom events. I am now making things more convenient and are facing a problem that I have never encountered before.
I use jQuery, so consider your answers. Thanks in advance.
I have a set of buttons defined as:
<input type="button" title="My 'useful' text here." disabled="disabled" />
I have these buttons with the default style:
div#option_buttons input {
cursor: help;
}
Then, using jQuery, I fire something like this as the click event in the select box:
window.current_column = '';
$('select.report_option_columns').live('click', function() {
var column = $(this).val();
if ( column == window.current_column ) {
window.current_column = '';
$(this).val('');
$('div#option_buttons input').attr('disabled','disabled');
$('div#option_buttons input').attr(
'title',
'You must select a column from this list.'
);
$('div#option_buttons input').css('cursor', 'help');
} else {
window.current_column = column;
$('div#option_buttons input').attr('disabled','');
$('div#option_buttons input').attr(
'title',
'Add this option for the column "' + column + '"'
);
$('div#option_buttons input').css('cursor', 'default');
}
});
, , ( ), , ( -). ( ), , . , , title . ( ), , , , , "", , .
, . -, disabled = "disabled" , title .
, ( , , ):
- , .
- , . , ( ), .
- , click. , , . "" , .
, , - ? - , , ? Google , , StackOverflow, .
** **
StackOverflow , , (, ).
URL- : Firefox
, , - . , - jQuery? .