Header attribute for disabled items in Firefox

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 ) {
        // clear our our previous selections
        window.current_column = '';
        // make this option no longer selected
        $(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? .

+3
4

. jQuery.

, , , , , , "Tipsy". ? " , , " facebook-like". , .

!

+3

, div, tipTip

<div style="cursor: pointer;" class="disabled" title="Do something to make it work" >   
        <input disabled="disabled" type="checkbox">
</div>
+4

, , jquery $(document).ready()

, harpax

+1

, "span", "p",... "My" ".

And change it with the button only when the user makes the right move.

+1
source

Source: https://habr.com/ru/post/1729280/


All Articles