Button not working on Mobile Devices but works on PC bootstrap
The issue may be that you're using the onClick event which won't register on a mobile device (as you don't click - you tap).
This answer explains how to use the "touchstart" event which will work on a mobile.
https://stackoverflow.com/a/22015946/2619909
html button not working in mobile device
Few observations :
- Not sure why have u added a div wrapper around the button. Try removing the div wrapper
- Your html mark up needs to be checked, since you are trying to view a html page on a mobile, if the elements are not structured properly, then there are high chances that one of the element be overlapping on the button. Hence the click event is not getting triggered for the button rather then it might be trying to trigger the click event of the overlapping element
Bootstrap Btn Classes Not Working on Mobile
Actually there are couple of mistakes in your code and expectation
- .btn-secondary class is not in the Bootstrap 3, You need to use Bootstrap v4 for that
- The button style which you have mentioned is of .btn-primary class not .btn-secondary class.
So replace the .btn-Secondary class to .btn-primary class,
then this code will work fine.
button, html input[type="button"], input[type="reset"], input[type="submit"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
Related Topics
How to Generate Event Handlers With Loop in JavaScript
Js Li Tag Onclick Not Working on Ie8
Delaying Angularjs Route Change Until Model Loaded to Prevent Flicker
After Clicking a Button of Sweet Alert Call PHP File
How to Import a Script into .Vue File
How to Merge the Property With Same Key in Two Object Array
How to Prevent Browser to Re-Set Inputs on Page Refresh
How to Increment a Number After Every 1 Second Using JavaScript
Regexp to Match Every Occurence After N Occurences
How to Prevent Drag on a Child, But Allow Drag on the Parent
Generate a Weighted Random Number
How to Push Value Pair into Object Using Method
How to Call the Same Method for Different Elements With Different Ids
Get the Value of Datepicker on Change in Jquery
Error: Permission Denied to Access Property "Document"
Cannot Set Property ... Which Only Has Getter (Javascript Es6)