W
W
Webdozerz2018-12-18 14:11:24
css
Webdozerz, 2018-12-18 14:11:24

How to remove the notification counter?

5c18d725b225e642646002.png
5c18d72b9f9b0122334657.png
5c18d73439d16360369017.png

document.querySelector('.button-offer-a').addEventListener('click', function(){
    var count = Number(el.getAttribute('data-count')) || 0;
    el.setAttribute('data-count', count + 1);
    el.classList.remove('notify');
    el.offsetWidth = el.offsetWidth;
    el.classList.add('notify');
    if(count >= 0){
        el.classList.add('show-count');
        $('.notif-block-notZero').css('display','flex');
        $('.notif-block-zero').css('display','none');
        $('.notif-block-notZero').css('overflow-y','scroll');
        var todos = $('.todo-list').html();
        localStorage.setItem('todos',todos)
    }
    if(count == 0 ){
        $('.notif-block-zero').css('display','flex');
        $('.notif-block-notZero').css('display','none');
        $('.show-count').attr('data-content','bar').fadeOut('slow');
    }
}, false);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrey Fedorov, 2016-02-14
@ddimonn8080

These are standard features of a mobile browser. However, it contradicts the canons of mobile design - the text should be clearly visible to the user of the mobile device immediately, without any taps. Accordingly, sites where there is such an opportunity are most likely not adapted for mobile.
I don’t even know if it’s worth trying to achieve this effect. Any additional action that the user needs to take will be annoying. In addition, it is not always obvious, not everyone knows that a double tap has such an effect. Here you need to either teach the user, or, again, immediately do it so that everything can be seen without taps.

I
Ivan Kostyuk, 2016-02-14
@Mayzer

use bootstrap grid during layout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question