I have been reading many tutorials online on how to get jquery working on drupal 7. Although there are many lines of code and examples, what i cannot find is what piece of code to put where (maybe it is obvious for most of the developers)
So, what I do is
1)I create a new custom block
2)Over there from drupal UI, I write my code
(function ($) {
$(document).ready(function(){
// jquery here
});
})(jQuery);
3)I display the block, but the jquery is not loaded.
I am reading that I should be putting this code in template files , theme files, css files, info files and I do not know whatelse!
It is not clear to me in which file exactly and in which path I have to put the above code to work properly ?
Any advice?
Many thanks!