Button does not accept jquery ui button effect

Hello, I have some code that gives a button a property of jqueryui buttons, but this does not happen when I open a page. Here is the jquery code:

function main(){
$("#showhid").button({
    icons:{primary:'ui-icon-disk'}, 
    text:false});

$("#showhid").click(function(event){
    alert(1);
}); }

Here is the page code:

<HEAD>
<LINK href="http://dev.karinapp.com/modules/appgen/css/batute.css" id="css_batute_4" rel="stylesheet" type="text/css"/>
<LINK href="http://dev.karinapp.com/modules/batute/css/main.css" id="css_batute_22" rel="stylesheet" type="text/css"/>
<LINK father="*head" href="/modules/appgen/css/batute.css" id="moveSel_css" rel="stylesheet" type="text/css"/><LINK father="*head" href="/modules/appgen/css/batute.css" id="moveSel_css" rel="stylesheet" type="text/css"/>
<SCRIPT id="script0" src="http://dev.karinapp.com/modules/general/scripts/jQuery.js" type="text/javascript"><!--empty--></SCRIPT>
<SCRIPT id="script1" src="http://dev.karinapp.com/modules/general/scripts/ui/jquery.ui.core.js"  type="text/javascript"><!--empty--></SCRIPT>
<SCRIPT id="script2" src="http://dev.karinapp.com/modules/general/scripts/ui/jquery.ui.widget.js" type="text/javascript"><!--empty--></SCRIPT>
<SCRIPT id="script3" src="http://dev.karinapp.com/modules/general/scripts/ui/jquery.ui.button.js" type="text/javascript"><!--empty--></SCRIPT>
<SCRIPT id="script4" src="http://www.karinapp.com/modules/appgen/scripts/batute.js" type="text/javascript"><!--empty--></SCRIPT>
<SCRIPT id="script5" type="text/javascript">window.onload=function(){
        main();}</SCRIPT>
</HEAD>
+3
source share
1 answer

Be sure to add the jQueryUI theme to your HTML head. When I check your button, I don't see any jQueryUI styles applied to it.

If I add a jQueryUI stylesheet (e.g. http://ajax.microsoft.com/ajax/jquery.ui/1.8.5/themes/black-tie/jquery-ui.css ), it works fine.

+3
source

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


All Articles