I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php

Driss,

I tend to break up css and javascript that’s specific to a template into files specifically for that template – that way if it’s not needed on every page, I’m not loading it and thus that allows me to keep my main.js and style.css smaller. Here’s how I normally do it:

if( is_page_template( 'room.php' ) ) {
    //Styles
    wp_enqueue_style( 'room-animate', get_stylesheet_directory_uri() . '/css/animate.css', array(), '1.0');
    wp_enqueue_style( 'room-composent', get_stylesheet_directory_uri() . '/css/component.css', array(), '1.0' );
    wp_enqueue_style( 'room-defaut', get_stylesheet_directory_uri() . '/css/default.css', array(), '1.0');
    //Scripts
    wp_enqueue_script( 'room-wall', get_stylesheet_directory_uri() . '/js/wallgallery.js', array( 'jquery' ), '1.0', true );
    wp_enqueue_script( 'room-custom', get_stylesheet_directory_uri()() . '/js/modernizr.custom.js', array( 'jquery' ),'1.0', true );
    //You don't need to call jQuery again, WP does that for you.
    //wp_enqueue_script( 'ajax', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js', array(), '1.0', true );
}

Important note: if your template isn’t in the theme’s main directory, make sure your condition includes the directory it’s in. For example, if you have your room.php template in a subdirectory you’d use this instead:

if( is_page_template( 'templates/room.php' ) ) { 

Try this method and once done, check the head and footer using developer tools to ensure the styles and scripts are loading. I commented out jQuery because WP is already loading jQuery and loading it twice will cause issues. You could de-enqueue WP’s jQuery and enqueue your older version, but that could potentially cause a series of other WP features to stop working.

If the styles and scripts are loading and you’re still having issues, those issues may be with the javascript itself.

Also, for this specific use case you’re asking about get_template_directory_uri() and get_stylesheet_directory_uri should be interchangeable.