In my project I'm use the mdl framework and jquery for ajax. Now I create index page and page.html. In index I have complete page structure and in page.html view like this:
<span class="mdl-list__item-primary-content">
<span>
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-1">
<input type="checkbox" id="checkbox-1" class="mdl-checkbox__input" >
</label>
</span>
<span>
</span>
<span class="mdl-list__item-text-body">
</span>
</span>
But that loaded page, load standard checkbox. I try to use js code like this:
document.querySelector('.mdl-js-checkbox').MaterialCheckbox()
or
document.querySelector('.mdl-js-checkbox').MaterialCheckbox.check()
or
$('.mdl-js-checkbox').MaterialCheckbox
and other a lot of method but anyone not work and my checkbox view like standard. Do you have any idea ?
Aucun commentaire:
Enregistrer un commentaire