Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've gottent this far: I have a list of featured image thumbnails loading into a metabox on my home-page template.

I'm stumped: I'm looking to make them sortable with jQuery but I'm really new to jQuery. The boxes move when I drag them but all haphazard, my placeholder is there but very small and they won't drop and save position.

Thanks!

Here's my code:

<script>
    $( '.sortable' ).sortable({
                placeholder: 'ui-placeholder'
            });
        $( '.sortable' ).disableSelection();

    });
</script>

How I'm getting my featured images from a custom post class to arrange:

<ul class="sortable">
            <?PHP 

                 $posts = get_posts(array(
                    'post_type'   => 'slidertype',
                    'post_status' => 'publish',
                    'posts_per_page' => -1,
                    'fields' => 'ids'
                    )
                );

                //loop over each post
                foreach($posts as $p){

                    $thumb =    get_post_meta($p,"_thumbnail_id",true);
                    $image = wp_get_attachment_image_src($thumb);

            ?>  <li><img src="<?PHP echo $image[0]; ?>" /> </li> <?PHP } ?>
        </ul>
share|improve this question
1  
This will be closed, because it's not a real question (no code example) and it's not certain how this pertains to WordPress and not jQuery. – Wyck Sep 24 '12 at 17:25
This is more of a jQuery/CSS question. – hereswhatidid Sep 24 '12 at 17:57

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.