I am loading html pages from assets and showing in application. HTML pages are showing but when I tried to change background color of button on "onclick" then background color is not getting change.
If i test pages with browser then it's working but when I load html pages in android using webview then it's not working.
onclick function getting called but somehow style property not getting applied. I tried following three ways.
1. $('#btnAC').css({'background-image', 'linear-gradient(180deg, black, red) !important'});
2. document.getElementById("btnAC").style = "background-image: linear-gradient(180deg, black, red) !important;";
3. $('#btnAC').css('background-image', 'linear-gradient(180deg, black, red) !important');
Java code :
WebView webView = (WebView) findViewById(R.id.webView);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webView.loadUrl("http:///android_asset/Web/index.html");