I am trying to add jquery slider code to my drupal site, in one of the block in my site.
But i am not able to add my code to drupal site & get it working.
How can i add the custom code to drupal site.
How can i solve this?
Code:
<script src="js/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".featured1").slideUp(7000);
});
</script>
<div class="featured1"><img src="images/2.png"></div>
theme_folder/js
, e.g, scripts.js, put your code into that file, open .info file of theme and add scripts[]=js/scripts.js
ORCreate 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' => 'file', 'group' => JS_THEME));
in YOUR_THEME_preprocess_page()
.