I read the Codex and a few blog posts about using jQuery in WordPress, and its very frustrating. I\'ve got as far as loading jQuery in functions.php file, but a
functions.php
You can use WordPress predefined function to add script file to WordPress plugin.
wp_enqueue_script( 'script', plugins_url('js/demo_script.js', __FILE__), array('jquery'));
Look at the post which helps you to understand that how easily you can implement jQuery and CSS in WordPress plugin.