D
D
Djag2019-06-17 11:46:49
JavaScript
Djag, 2019-06-17 11:46:49

js code not working on mobile devices. How to fix?

Good afternoon! Help, please, advice. js code not working in mobile browsers.

var $showAll = $('#show-all'),
    $wrapper = $('.wrap'),
    $rollBack = $('#roll-back');

$showAll.on({
  click: function(){
    	$wrapper.addClass('shown');
        $showAll.hide();
    $rollBack.show();
    }
});

$rollBack.on({
  click: function(){
    	$wrapper.removeClass('shown');
        $showAll.show();
    $rollBack.hide();
    }
});

Clicking the Details button should open the description. Everything works fine on the PC.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question