0
$('div.input-player-close#player').click(function (event) { 
    if ($(".input-player-close").length) {
        $('div#player').removeAttr('class').addClass('input-player-plus');
        $('div#player p').html("Select the filename");
    }
});      

$('div.input-player-plus#player').click(function (event) {  
    if ($("div.input-player-plus").length > 0) {
        $('div#player').removeAttr('class').addClass('input-player-close');
        $('div#player p').html("Print the filename");
    }
});

What above should do

<div class="input-player-plus" id="player">
  <p>Select the filename</p>
</div>

After clicked

<div class="input-player-close" id="player">
  <p>Print the filename</p>
</div>

The above fails to perform my expected output, looks no issue in the above code, still somewhere, something i am missing.

Bharanikumar
  • 25,457
  • 50
  • 131
  • 201

0 Answers0