• Resolved techy93

    (@techy93)


    page id is 18168.

    this code does not work with your plugin: $(‘.whatToMove’).prependTo(‘.whereToMove’);

    I’m trying to move one div to another div position.

    how can i make it work using your plugin?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    Hi,

    In order to use jQuery code with this plugin, you’ll need to wrap it in some PHP code:

    add_action( 'wp_enqueue_scripts', function () {
        wp_enqueue_script( 'jquery' );
    } );
    
    add_action( 'wp_footer', function () {
    ?>
    <script>
        (function( $ ) {
            $(function() {
    
            $(‘.whatToMove’).prependTo(‘.whereToMove’);
     
        });
    }(jQuery));
    
    </script>
    <?php } );
    • This reply was modified 8 years, 5 months ago by Shea Bunge.
Viewing 1 replies (of 1 total)
  • The topic ‘would like to move an element on the page’ is closed to new replies.