I'm starting the slideshow in a pop up div by clicking a button using $('#slider2').data('AnythingSlider').startStop(true);
Stopping the slideshow by $('#slider2').data('AnythingSlider').startStop(false);
When I click the same button to show again it simply continues from the slideshow that was stopped before. I want the whole slideshow to restart again. How can I do that ?
when restarting, do this:
$('#slider2').anythingSlider(1); // Reset to first slide
$('#slider2').data('AnythingSlider').startStop(true);
Related
I am trying to be disabled when another button gets clicked, currently it does disable the button but I am stuck on when refreshing page the button gets enabled again. Any ideas on how to keep the button disabled even on refresh?
I'm trying to write a simple main menu page with this hierarchy:
MainMenu (an empty game object)
↳ Canvas
↳ PlayButton (a TextMeshPro Button)
I want the button to deactivate the 'MainMenu' object in the hierarchy when clicked, thus hiding its Canvas child and the Button along with it. To do this, I'm providing the MainMenu object reference to the Button's OnClick() callback and calling 'GameObject.SetActive' to false when clicked.
My problem is that when I click the button, the MainMenu hierarchy get grayed out in the editor but the Button sticks around with its yellow Highlighted color shown. It does disappear if I change the display resolution while still in Play mode (maybe forcing a refresh?), but I can't figure out why deactivating the MainMenu wouldn't make it refresh in the same way.
I've tried calling SetActive(false) on the PlayButton and the Canvas themselves- I also tried setting enabled = false on them, but the Button appearance behaves the same. From everything I've read, calling SetActive(false) should hide whatever gameObject I call it on, so I can't figure out what I'm missing.
Alright, found my own mistake. The Camera's Clear Flags setting was Don't Clear, so even calling Destroy(gameObject) on it didn't remove it from the screen.
Setting the Camera to use ClearFlags: Solid Color fixed the problem.
It looks to me like you have a button in your grid that is displaying. When the game is playing, after you click to turn off the button, go to the scene tab, click the yellow button and see where that object is.
If in doubt (For testing purposes only) delete the button on click and if you see something else then it is obviously not that button.
I am creating two buttons using form.io which is the type of Submit.
But here I am facing an issue when clicking on any button all the buttons on that page enables progress icon.
How can disable that progress icon or how can I enable for only the one which is clicked
I solved this problem using css , display none for the image
I have a small code as shows below, I want to add previous and next button when pictures popup.
https://www.jqueryscript.net/gallery/Simple-Clean-jQuery-Vertical-Product-Gallery.html
In my page i use this:
this.navCtrl.push(HomePage);
Automatically generated back button
but a back button will automatically be added to the pushed view, how to use default bar?
If you do not want the Back button to be shown as an option you could simply hide it on the page in which you are navigating to.
<ion-navbar hideBackButton="true"></ion-navbar>
More info on Ionic NavBar here.
If you don't want to have the back button then you can set it as a root page using "setRoot()" instead of push() like this,
this.navCtrl.setRoot(HomePage);
just try this it work great for me it will be automatically deactivate back button and show Menu toggle
this.childNavCtrl.setRoot(HomePage);