Change navigator.notification.confirm Background color (white to black)

I am making a Native App (for Android, IOS, BB10 & BB7) Using

jquery.mobile-1.2.1.min.css

jquery-1.8.3.min.js

jquery.mobile-1.2.1.min.js as well as cordova.js in my application.

My code seems

 <!--My Script Tag Code--> <script> document.addEventListener("deviceready", loaded, false); function loaded(){ alert("device is ready"); } function MamWorkDone(){ navigator.notification.confirm("Are you sure you want to exit ?", onConfirm, "RoomsTonite", "Yes,No"); function onConfirm(button) { } } </script> <!--My Html5 Code Looks like--> <body> <div data-role="page"> <div data-role="header" > <h1>Page Title</h1> </div> <!-- /header --> <div data-role="content"> <a href="#" data-role="button" id="btn_id" data-inline="true" onclick="MamWorkDone();" >Clear the Code</a> </div> <!-- /content --> <div data-role="footer"> <h4>Page Footer</h4> </div> <!-- /footer --> </div> <!-- /page --> </body> 

this code may display a confirmation dialog that looks like enter image description here

Here, my Confirmation dialog box goes against a white background. But I want the Confirm dialog box to be black and the text color is white, not black? Please help me solve this problem? Thanks at Advance

+4
source share
1 answer

I think we cannot change the background and text, as it is standard on certain platforms. Like Android, it looks like this, and for iOS it will look different.

So, to customize the notification window, you can use the jAlert or jquery popup.

http://www.smooka.com/blog/2009/02/22/jalert-jquery-alert-box-plugin/

http://jquerymobile.com/demos/1.2.0/docs/pages/popup/

+1
source

Source: https://habr.com/ru/post/1501434/


All Articles