Tye Lucas Tye Lucas - 29 days ago 6
Javascript Question

How do I hide a button with data-status = 'Processing' using JQuery

Here is my code after its processed:

<button class="btn btn-icon btn-danger command-delete" id="delButton" aria-describedby="tooltip779899" type="button" data-original-title="Delete Sales Order" data-toggle="tooltip" data-target="#modalDelete" data-placement="top" data-row-id="34" data-status="Processed"><span class="zmdi zmdi-delete"></span></button>


I need to hide the button when the data-status = "Processed"

Any help is MOST appreciated!

Answer
$("button[data-status='Processed']").hide();

You can select element(s) based on one of it's attribute.

Comments