3 steps:
php
<?php
wp_enqueue_script( 'jquery-ui-sortable');
html
<div class="metabox-holder">
<div class="postbox-container">
<div id="my_div" class="meta-box-sortables ui-sortable">
<div class="postbox" id="el1">
<h3 class="hndle"><span>title2</span></h3>
<div class="inside">content1</div>
</div>
[...elements...]
<div class="postbox" id="el20">
<h3 class="hndle"><span>title20</span></h3>
<div class="inside">content1</div>
</div>
</div>
</div>
javascript
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#my_div').sortable();
});
Related Posts:
- Show post in slider
- Slider loading issue
- Add other class content with reference class value
- Most efficient way to add javascript file to specific post and/or pages?
- Pass media upload value to input field
- JqueryUi Dialog giving Uncaught TypeError: this._addClass is not a function error
- WordPress Ajax always returns a 404 error
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- Minify HTML, CSS, JS with PHPWee?
- Click loads template via ajax
- Display notification only once
- Access/update database with jQuery
- Using wp_localize_script to store the template url into a variable to use in JS
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Sending jsPDF documents to the server
- Ajax return code 400
- Displaying theme options in css
- Using shipped version of jquery
- js file in root loading without
- class click counter save number
- AJAX request status 200 but no actual “response”
- Selectbox in admin panel function linking to CSS
- Using if/else statements with output from theme options
- How to design a table based on css values set from admin/dashboard
- Save Search System
- dynamic dependent select dropdown
- Ajax load more button for comments wordpress
- Gravity form built in Captcha
- Menu jumping when calling it via PHP
- How does wp_enqueue_scripts work?
- Setting value of session with Ajax not working
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Post repeating with infinite scroll
- Fancybox type popup window that’s not an iframe
- How do I Import / Upload Files with jQuery AJAX?
- WordPress Ajax Call inserting data but success response false
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- Error – ‘create_function is deprecated’ [closed]
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- Add Codepen animation as Preloader to WordPress
- Is it save to use eval for a jQuery callback method coming from the database?
- Jquery window.send_to_editor function
- trouble with page_id & highlighting current page
- wordpress admin plugin menu custom css
- How to Change CSS Colors from Custom Plugin Settings Page
- Post repeated when opening in overlay, how do I solve this? [closed]
- jQuery accordion menu
- Link to page with posts of specific type
- Covert WordPress Blogname into JQuery
- what does $options = get_option(‘test_theme’); do?
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- Using theme options to change a border-radius value
- Hot to check if new posts have been published since page load and notify online users?
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- Admin-ajax.php 404 error
- How to pass values from one function to the other using an array variable
- How to use wp_ajax_set_post_thumbnail?
- Update $wpdb query with AJAX
- Google CSE Malfunctions via Chrome/Safari on Mobile When Clicking on Either Search Icon/Menu Icon. How to Make Google CSE Default Theme Search
- I have a lot of JavaScript erorrs after SSL someone can help me?
- register dependency css and js inside a plugin class
- AJAX to add to cart multiple products woocommerce
- Show the subcategory name based on current product
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- Move Jquery.js to Footer
- Styling a specific post after hovering over it
- How to echo a PHP code into WooCommerce variation product?
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- WordPress load javascript file if something… (after the page is loaded)
- include javascript Multiple files in wordpress through script.js
- custom field – changing an element or background of id div – different versions not working
- Target a specific container to style on WordPress storefront theme
- Bootstrap Carousel Indicators Won’t Cycle On Custom WordPress Theme
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- Find the method which AJAX GET calls
- Default Image not showing up in Customizer for WP_Customize_Cropped_Image_Control
- How to create a radio button to alt between settings in wp_options table
- Where to find the html for WordPress site? [closed]
- Why I’m Not Having Access to “$_POST” Data Outside My AJAX Callback?
- Add a downloaded JS file to WordPress
- How to call javascript function (jquery) in a shortcode?
- 500 (Internal Server Error) of external php file
- How can I correctly POST to a WordPress page?
- Dynamic Gallery
- How to change a specific character in a theme option value – replace a space with a plus sign
- Cannot get custom javascript to execute on page
- How to create and add js and css file when server is not on my PC?
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- JSON Object Value Show Undefine
- Adding jquery using php function
- How to hide .js files on wordpress website using php or wp plugins or any? [closed]
- notify users when changed database
- get_post_meta returns on side but it doesn’t return on bottom of admin page
- Retrive the value of the Active variation of the product and then link it to the “read more” to dynamically change
- JQuery UI Autocomplete showing as bullets
- Embed dynamic media query in a Gutenberg block
- Translating the “Everything” filter menu in Quicksand jquery file
- Hide or Show Read More Button by Content Area