how to display post in jquery slider and carousel

You want get_posts not query_posts. Only use the latter if you need to modify the main query.

Something like this (in whatever template file you want):

<ul class="slider">
<?php
global $post;
$args = array( 'numberposts' => 5, 'order'=> 'ASC', 'orderby' => 'title' );
$myposts = get_posts( $args );
foreach( $myposts as $post ) :
    setup_postdata($post); 
?>
    <li><a href="https://wordpress.stackexchange.com/questions/60828/<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>

Rinse, lather, repeat with necessary parameters for carousel.