hidura
hidura

Reputation: 693

Button doesn't take the jquery ui button effect

Hello i have a code that give to a button the property of the jqueryui-buttons but it doesn't take when i open the page. Here is the code of the jquery:

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

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

Here is the code of the page:

<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>

Upvotes: 3

Views: 1501

Answers (1)

Andrew Whitaker
Andrew Whitaker

Reputation: 126042

Make sure to include a jQueryUI theme in your HTML head. When I inspect 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.

Upvotes: 3

Related Questions