How to add JQuery code to drupal site I am trying to add my JQuery code to my drupal 7 site.

In my drupal based site i have image in the featured block.
My JQuery code slides up the image after 2 seconds.

When i added the JQuery code to my page it is showing the JQuery code on the page.

Here is my code:

&lt;script src="/drupal/sites/default/files/js/jquery.min.js"&gt;&lt;/script&gt;&lt;script&gt;
$(document).ready(function(){
    $(".sec1").slideUp(7000);
});
&lt;/script&gt;


when i save the configuration, below codes are displayed in web page. 

$(document).ready(function(){
        $(".sec1").slideUp(7000);
    });


How can i solve this?
If you don't know how to add your js code to drupal, there are two ways:


Create js file in your theme_folder/js, e.g, scripts.js, put your code into that file, open .info file of theme and add scripts[]=js/scripts.js
Create a js file as I wrote above and open template.php of your theme and put       

drupal_add_js(drupal_get_path('theme', 'YOUR_THEME_NAME') . '/js/scripts.js', array('type' =&gt; 'file', 'group' =&gt; JS_THEME));


in YOUR_THEME_preprocess_page(). 
(This is not an ideal way, but it shows how you can use a drupal_add_js() function)


also read documentation for more info.