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?
- 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
- Display notification only once
- 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]
- Using wp_localize_script to store the template url into a variable to use in JS
- How to speed up admin-ajax.php in wordpress
- JQuery not working on WordPress Admin page [closed]
- 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
- Putting PHP variables into javascript [duplicate]
- How to test nonce with AJAX – Plugin development
- js file in root loading without
- class click counter save number
- 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
- 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
- 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
- How does wp_enqueue_scripts work?
- 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
- 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
- Why i can’t get custom fields value or post ID via Ajax?
- 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
- Slider from different widgets
- 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?
- 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
- Cannot get custom javascript to execute on page
- 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?
- 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
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- 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
- How to add icon to WooCommerce add to cart button
- Can’t find elemnts on the DOM using Custom Control in Customizer API
- Embed dynamic media query in a Gutenberg block
- Why jquery arrray return 0 value
- Translating the “Everything” filter menu in Quicksand jquery file
- How do I ensure that the URL parameters are updated correctly when multiple filters are applied