Sorry to be annoying. I know I’m asking a lot of questions.
Anyway, I’m creating a popup with several custom buttons for a wizard interface, so I have next and back buttons. The problems is I need these buttons to be hidden on the first page, so when the popup first opens. I then display the buttons on page 2.
This is what I’m trying to do…
I’ve given these buttons class names so that I can get a handle to them (though I would much prefer to give them each an ID but that doesn’t seem possible, correct me if I’m wrong) and I’m trying to hide them in the ‘onMarkupReady’ event.
var requestlistpopup = $('#requestlistpopup').mobiscroll4().popup({
display: 'top',
responsive: {custom: {breakpoint:400,display: 'center'},},
scrollLock: false,
theme: 'auto',
buttons: [{text: 'Back',cssClass: 'mbsc-fr-btn0 mbsc-fr-btn-e mbsc-fr-btn backbutton',handler: function(event){slide(slideIndex - 1);}},
{text: 'Next',cssClass: 'mbsc-fr-btn1 mbsc-fr-btn-e mbsc-fr-btn nextbutton',handler: function(event){slide(slideIndex + 1);}},
{text: 'Cancel',handler: function(event){requestlistpopup.hide();slide(0);}}
],
onMarkupReady: function(){
$('.backbutton').hide();
$('.nextbutton').hide();
}
}).mobiscroll4('getInst');
This is not working.
I also tried giving them the ‘mbsc-cloak’ class, which kind of works except then I can’t display them using $(‘.backbutton’.show(); and I’m not sure why.