Answer the question
In order to leave comments, you need to log in
Why doesn't JS work on mobile devices?
$(document).on('click', '.disabled-chat', function () {
$(this).removeClass('disabled-chat');
$(this).addClass('active-chat');
$(".chat-right").css({"width":"327px","padding":"0 7px 0 7px"});
return false;
});
Answer the question
In order to leave comments, you need to log in
Try to do without delegation and return nothing from the function.
$( '.disabled-chat' ).on( 'click', function () {
$( this )
.removeClass( 'disabled-chat' )
.addClass ( 'active-chat' );
$( '.chat-right' ).css({
"width" : "327px",
"padding" : "0 7px 0 7px"
});
});
And one more thing: for mobile devices, it is better to use tap, not click. Click has a 300ms delay before firing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question