By ananto on
I want to develop a module in Drupal 5 that use jQuery UI widgets like Dialog UI. I already use drupal_add_js to include jQuery.UI-1.5 files, I also use drupal_add_css to include the css files from jQuery.UI.
But when I want to display the dialog, it doesn't display like the demos from jQuery.UI. It seems that Drupal not use all css from jQuery.UI. The code I use in my module is like this :
drupal_add_css('sites/all/js/jquery-ui/themes/flora/flora.all.css');
drupal_add_js('sites/all/js/jquery-ui/jquery.dimensions.js');
drupal_add_js('sites/all/js/jquery-ui/ui.dialog.js');
drupal_add_js('sites/all/js/jquery-ui/ui.mouse.js');
drupal_add_js('sites/all/js/jquery-ui/ui.resizable.js');
drupal_add_js('sites/all/js/jquery-ui/ui.draggable.js');
drupal_add_js(drupal_get_path('module', 'testingjq') . '/testingjq.js');
and the simple code in testingjq.js is like this :
if (Drupal.jsEnabled) {
$(document).ready(function(){
$('#button').click(function(){
$('#example1').dialog();
return false;
});
});
}
What's wrong with my code ? Can anyone help me ? Thanks.
Comments
Hhmmm... I test that code
Hhmmm... I test that code above with IE and it's work, but when I use Firefox the display is mess. Is there any suggestion ?
Which version of Drupal are
Which version of Drupal are you using, and are you using the built-in jQuery version? There are some modules, for example the jQuery_Update (http://drupal.org/project/jquery_update) module that should include UI in one of the newer versions. There is also the UI module at http://drupal.org/project/ui and jQuery UI Backport at http://drupal.org/project/jquib.
I don't know which one works best.
I use Drupal 5.7 and also
I use Drupal 5.7 and also had installed jquery_update with the version of jQuery is 1.2.3, but I don't think that jQuery_update also include jQuery UI in the installation (I've check the files, there is no .js files for UI).
I know about jQuery UI Backport but in the they page said :
And about User Interface in http://drupal.org/project/ui, I don't know where to download it actually, because where I go to that page, I don't see link where to download it. Can you help me with this one ?
=-=
it may be in CVS @ cvs.drupal.org
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
I guess the UI module still
I guess the UI module still use jQuery UI version 1.0, I want to use the newest jQuery UI v1.5.
Is there any other solution ? or jQuery UI just for Drupal 6 only ?
Is there any one out there
Is there any one out there ever use jQuery UI in Drupal 5 ? Can u share with me please...
Thx.
subscribe
subscribe