Hi Guys, I am trying to use jqueryUI with Wordpress admin panel. I have added jqueryUI custom css/js files in plugins folder and calling them inside my plugin index file but no effect. Can anybody help me with steps please as I am newbie? thx Pras
To run a Jquery script and avoid the conflict with wordpress you have to use this function : WP_ENQUEUE_SCRIPT() function my_init() { if (!is_admin()) { wp_enqueue_script('jquery'); } } add_action('init', 'my_init'); Code (markup): Replace my_init with another word according to your script... Here is a good wordpress codex to learn more about how to use jquery in wordpress : wp_enqueue_script() add_action() is_admin() Goodluck
Yes. I got this. In which directory I need to place jquery custom js and css files? And how I need to call them in my plugin index file?
Ok, my question is that you are building your own Plugin or you just need to use a Jquery plugin on your wordpress website !?
Well, I am developing my own plugin in Wordpress. I want to use some jquery UI features there to look better but I am not sure what files I need to call and how. I would really appreciate if you can share some steps to do so.
ok there is 2 things : 1- the jquery library included with wordPress loads in "no conflict" mode. This is done to prevent compatibility problems with other javascript libraries. In "no-confict" mode, the $ shortcut is not available and the longer jquery is used, Example : jQuery(document).ready(function ($) { Code (markup): So by including the $ in parenthesis after the function call you can then use this shortcut within the code block.. so you have to pay attention to that! 2- To get all to work for your plugin please check this Article : Link Hope that will help !