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
- WordPress Admin Bar pushed Sticky Footer off the bottom of the page
- Pass media upload value to input field
- Combine CSS and JS files from plugins
- 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
- How to use WordPress (PHP) functions in AngularJS partials files?
- Nice scroll to wordpress
- Using an Image Slider twice on the same page
- Minify HTML, CSS, JS with PHPWee?
- Click loads template via ajax
- Archive dropdown styling not applied
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- How to speed up admin-ajax.php in wordpress
- JQuery not working on WordPress Admin page [closed]
- Sending jsPDF documents to the server
- Ajax return code 400
- Displaying theme options in css
- Putting PHP variables into javascript [duplicate]
- How to test nonce with AJAX – Plugin development
- js file in root loading without
- AJAX request status 200 but no actual “response”
- How to select the contents in the text view textrea in wp_editor?
- Theme Options Page – User Updates Logo
- How to design a table based on css values set from admin/dashboard
- Save Search System
- dynamic dependent select dropdown
- Incorrect MIME type for assets with Valet
- Ajax load more button for comments wordpress
- How to add a do_action on refreshing of WP customizer?
- Gravity form built in Captcha
- Menu jumping when calling it via PHP
- Setting value of session with Ajax not working
- WordPress Multiple Navigation bars
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Add / Update Custom Fields After Select Pictures in Media Window
- Fancybox type popup window that’s not an iframe
- How do I Import / Upload Files with jQuery AJAX?
- 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?
- 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
- Why i can’t get custom fields value or post ID via Ajax?
- JS file is not loading when i put wp_head() and wp_footer
- Link to page with posts of specific type
- Accessing an API with jQuery and AJAX
- Replacing WordPress Icons (menu,icons32, etc)?
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- Using theme options to change a border-radius value
- How to sort posts by active category in WordPress?
- 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 do I integrate vanilla Javascript to a wordpress website?
- 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
- WordPress Slider is not working
- AJAX to add to cart multiple products woocommerce
- Change CSS Variable value in Theme Customizer Live Preview
- Using wp_editor() when not logged stopped working
- Move Jquery.js to Footer
- Bring Font Awesome icons inside menu A tags
- 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?
- How to call a function from functions.php with ajax?
- WordPress load javascript file if something… (after the page is loaded)
- include javascript Multiple files in wordpress through script.js
- number of posts with “Load More”
- Target a specific container to style on WordPress storefront theme
- 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
- Why I’m Not Having Access to “$_POST” Data Outside My AJAX Callback?
- Add a downloaded JS file to WordPress
- Slider from different widgets
- How to call javascript function (jquery) in a shortcode?
- How can I correctly POST to a WordPress page?
- Why this plugin is not working?
- Combining fancybox with multiple thumbnail plugin
- Dynamic Gallery
- Trying to fix multiple category drop down
- Trying to customize wordpress drop down categories
- How to change a specific character in a theme option value – replace a space with a plus sign
- Add specific phrase after every product title including the discounted price? [closed]
- How to create and add js and css file when server is not on my PC?
- 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