Help needed. Adding jQuery Multiselect to a new plugin
-
Dear all.
I’m not a coder. I know just a little of php and mysql. But i have some common understanding of things ??
For the plugin that i’m developing for my website (www.8ball.lu) i need to add jQuery Multiselect script (https://quasipartikel.at/multiselect).
Multiselect would be used in one page of plugin administration. But i am not able to make it work. I have read a lot of tutorials, saw a lot of examples, and nothing seems to work for me.
The lines, I have stopped at are (I am using absolute addresses for it to be clear now. Will change after):
wp_enqueue_script('jquery', 'https://www.8ball.lu/wp-content/plugins/billiards-manager/styles/jquery-1.3.2.min.js', array('jquery'), '1.3.2'); wp_enqueue_script('jquery-ui-custom', 'https://www.8ball.lu/wp-content/plugins/billiards-manager/styles/jquery-ui-1.7.3.custom.min.js', array('jquery', 'jquery-ui-custom')); wp_enqueue_script('jquery-multiselect', 'https://www.8ball.lu/wp-content/plugins/billiards-manager/styles/ui.multiselect.js', array('jquery', 'jquery-ui-custom','jquery-multiselect')); wp_enqueue_style('multiselect-style', 'https://www.8ball.lu/wp-content/plugins/billiards-manager/styles/jquery-ui-1.7.1.custom.css');
The other problem is that i do not have clear idea, where to put these lines.
My main file contains:add_action('admin_menu', 'billiards_admin_actions'); function billiards_admin_actions() { add_menu_page("Billiards Manager", "Billiards Manager", 1, "Billiards Manager", "billiards_about"); add_submenu_page("Billiards Manager", "About BM", "About BM", 1, "Billiards Manager", "billiards_about"); add_submenu_page("Billiards Manager", "Licenses", "Licenses", 1, "Licenses", "billiards_licenses_admin"); add_submenu_page("Billiards Manager", "Clubs", "Clubs", 1, "Clubs", "billiards_clubs_admin"); add_submenu_page("Billiards Manager", "Fixtures", "Fixtures", 1, "Fixtures", "fixtures_admin"); add_submenu_page("Billiards Manager", "Billiard Manager Settings", "Settings", 1, "Settings", "billiards_settings"); add_submenu_page("Billiards Manager", "Players", "Players", 1, "Players", "players"); } function billiards_about() { echo '<div class=wrap>'; include('admin/about.php'); echo '</div>'; } function billiards_licenses_admin() { echo '<div class=wrap>'; include('admin/licenses.php'); echo '</div>'; } function billiards_settings() { echo '<div class=wrap>'; include('admin/settings.php'); echo '</div>'; } function fixtures_admin() { echo '<div class=wrap>'; include('admin/fixtures.php'); echo '</div>'; } function billiards_clubs_admin() { echo '<div class=wrap>'; include('admin/clubs.php'); echo '</div>'; } function players() { echo '<div class=wrap>'; include('admin/players.php'); echo '</div>'; }
I want to use jquery Multiselect in the file players.php.
Please advise stupid me, what I am doing wrong ??
- The topic ‘Help needed. Adding jQuery Multiselect to a new plugin’ is closed to new replies.