EasyUI Forum
May 03, 2024, 07:36:15 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: menu not compatible with jQueryUI  (Read 23139 times)
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« on: May 30, 2012, 02:34:57 AM »

Should easyUI be able to be loaded together with jQueryUI?

Because I get a function and css conflict with the function and class ' menu '

In our current setup I use the jQueryUI autocomplete to deliver suggestions through a JSON call.
No I'm forced to use the easyloader because of the menu conflict though...

Any thoughts about this?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 30, 2012, 03:30:54 AM »

Some easyui plugins are conflict with jQueryUI. Try load the single menu plugin on the page that included the jQueryUI autocomplete plugin.
Code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="easyui/easyloader.js"></script>
<script type="text/javascript">
$(function(){
$('#autocomplete').autocomplete({
source:["Aaa","Aaa2","Bbb"]
});
using('menu',function(){
$('#mm').menu().menu('show',{
left:100,
top:50
});
});
});
</script>
</head>
<body>
<div id="mm" style="width:150px">
<div>File</div>
<div>Help</div>
</div>
<div>
<input id="autocomplete" style="z-index: 100; position: relative" title="type &quot;a&quot;" />
</div>
</body>
</html>
Logged
Ellipsis
Full Member
***
Posts: 113


View Profile WWW
« Reply #2 on: May 30, 2012, 03:38:24 AM »

I''l try your example and see what happens, I'll let you know today!

UPDATE:

Ok this definitly does the trick!

The part:

Code:
using('menu',function(){
jQuery('#mm').menu().menu('show',{
left:100,
top:50
});
});

Does the trick, but what is the magic? How does the easyloader loads the menu module?
My guess is that the using() method is from the easyloader, and this way the correct menu function is called... 
« Last Edit: May 30, 2012, 04:34:14 AM by reno1979 » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!