N
N
Nathan Stark2016-05-29 07:50:10
JavaScript
Nathan Stark, 2016-05-29 07:50:10

Question about uikit and JS. How to get the data value of the element a, in the event of the modal window "show.uk.modal"?

Best wishes to all!
Call modal window on click on link

<a href="#modalAuth" data-type="REGISTRATION" data-uk-modal="{center:true}">Регистрация <i class="uk-icon-user-plus"</a>
<a href="#modalAuth" data-type="AUTH" data-uk-modal="{center:true}">Войти <i class="uk-icon-sign-in"></i></a>

How can I now get the data-type value from the clicked link in the "show.uk.modal" event?
$('#modalAuth').on({
        'show.uk.modal':function(modal){
            var type =????;
            console.log(type);
        },
        'hide.uk.modal': function(){}
    });

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