Cambio de class un div con jquery, pero cuando intento usar jquery con el class al que e cambiado no funciona. https://jsfiddle.net/m76pk7s2/
$('.ver_drop').click(function() {
$( this ).text( "Ocultar drop" );
$( this ).toggleClass( "ocultar_drop" );
$( this ).removeClass( "ver_drop" );
$('.ember-view.win-feed-header').css('display', 'initial');
});
$('.ocultar_drop').click(function() {
$( this ).text( "Ver drop" );
$( this ).toggleClass( "ver_drop" );
$( this ).removeClass( "ocultar_drop" );
$('.ember-view.win-feed-header').css('display', 'none');
});
$('.ver_tickets').click(function() {
$( this ).text( "Ocultar tickets" );
$( this ).toggleClass( "ocultar_tickets" );
$( this ).removeClass( "ver_tickets" );
$('.scrollbox').css('display', 'initial');
});
$('.ocultar_tickets').click(function() {
$( this ).text( "Ver tickets" );
$( this ).toggleClass( "ver_tickets" );
$( this ).removeClass( "ocultar_tickets" );
$('.scrollbox').css('display', 'none');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<h1 class="ember-view win-feed-header" style="display:none">
Ember view
</h1>
<h1 class="scrollbox" style="display:none">
scrollbox
</h1>
<a class="ver_drop">Ver drop</a> <a class="ver_tickets">Ver tickets</a>