trying to enqueue script in wordpress
<p>I've read the codex section on wp-enqeue, but am still struggling.</p>

<p>Basically, I would like to get the following to display properly in my theme's widget area (on every page):</p>

<pre><code>&lt;link rel="stylesheet" type="text/css" href="/wp-content/uploads/social_counter/css/styles.css" /&gt;
&lt;link rel="stylesheet" type="text/css" href="/wp-content/uploads/social_counter/css/tipTip.css" /&gt;

&lt;div id="social_counter"&gt;
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="/wp-content/uploads/social_counter/js/social_counter.js"&gt;&lt;/script&gt;
&lt;/div&gt;
</code></pre>

<p>I created a text widget into which I pasted the code, but it breaks a few things in the template as there is likely a conflict since jquery is already loaded by the theme and/ or other plugins.</p>

<p>Could someone show me how to best form this using wp_enqueue, and where to paste the subsequent code (functions.php of theme?)?</p>

<p>Thanks.</p>

<p>I've tried the following:</p>

<pre><code>if(!is_admin()){
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);
wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);
}
</code></pre>

<p>It seem to load two of the scripts when I view the page source, but not the google jquery, and the content does not show... </p>

<p>now i have the following, still nothing (two scripts show up, but not the google jquery):</p>

<pre><code>wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
wp_enqueue_script( 'jquery' );
wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);
wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);
</code></pre>

<p>Latest Edit.. (i really wish stack overflow would adopt a mroe user-friendly threading system :/ )</p>

<pre><code>function add_scripts(){
// Load jQuery
if ( !is_admin() ) {
   wp_deregister_script('jquery');
   wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"), false);
   wp_enqueue_script('jquery');
}
// Your Scripts
wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/jquery.tipTip.minified.js',false);
wp_enqueue_script('custom_script',get_bloginfo('wpurl').'/wp-content/uploads/social_counter/js/social_counter.js',array('jquery'),'1.4.2',false);
}
add_action('init','add_scripts');
</code></pre>
