Skip to content Skip to sidebar Skip to footer

How To Select Button By Particular Text Using Jquery

I am trying to change CSS of button using jquery, but i am not able to find the button using text property, my JQuery is: $.ajax({ url : '{{url('booktable')}}', ty

Solution 1:

Maybe this code will help you: https://jsfiddle.net/auczzk5x/

You fill a text input with word: special or unspecial. And buttons below have text atributte with value of one of these words. For example, if you type special and click Clorize Buttons than buttons with text="special" will be in red color.

In your code above there is no HTML element with id="table", that you use in jQuery code: $('#table button[text='+elmt+']'), what suggests that buttons are in element with id="table".

Post a Comment for "How To Select Button By Particular Text Using Jquery"