Open jaipundir opened 6 years ago
I think you should arrange this in javascript before calling the modal. As far as i know there is nothing in semantic-ui for this behaviour.
Have you tried using the device visibility classes to only show the option when on mobile https://semantic-ui.com/collections/grid.html#device-visibility
I have not getting any help from url @hammy2899
What do you want, an option in the modal to explicitly only allow it to open on mobile devices?
Something like this should work:
var md = new MobileDetect(window.navigator.userAgent);
if(md.tablet() || md.mobile()){
$('.ui.modal').modal('show');
} else {
// Do something else
}
I am using aurelia js with semantic ui. so i cant add mobile-detect.js file in my application. THis number of code not work for me.
Hmm don't know why you can't add it, should not be a problem. This is just an example how you can do it. You should find your own way for detecting this, there are a lot of ways to this.
If it where a sidebar you could use:
$('#mySidebar').sidebar('is mobile')
I have use semantic ui model popup for showing data. In my case I want showing popup model in only mobile View. I have Use following code :
In JS
$('.ui.modal').modal('show');
So how can i disable this popup for desktop view only view in Mobile thanks.