Matej Matej - 1 year ago 144
jQuery Question

change css style after modal is hide

when I click on my table row there appear modal window and change "tr" background-color indicates for each row was modal opened. However, when I close my modal background color of tr remains the same. How to change it to default?

<tr class='revisions'>
<td>{{ $revision->date_of_revision->format('d.m.Y') }}

<td class="text-right">
class='btn btn-warning revisionEdit'>
<span class="glyphicon glyphicon-pencil"></span>


Answer Source

If you're changing the color with JavaScript then you can use the Bootstrap modal events to change it back when hidden.

    $('.modal').on('', function (e) {
        $("selector").css("background-color", "#EEEEEE");

According to w3fools: Occurs when the modal is about to be shown. Occurs when the modal is fully shown (after CSS transitions have completed) Occurs when the modal is about to be hidden Occurs when the modal is fully hidden (after CSS transitions have completed)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download