Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I trying to add javascript manually in wordpress website .But I didn't able to do it till in this moment!

Please give me correct code for embedding javascript in wordpress?
Posted
Comments
AmitGajjar 23-Jan-12 4:11am    
can you show us your code. how you are doing this ?
ahmed559 23-Jan-12 12:33pm    
wp_enqueue_script('my_javascript_file', 'http://localhost/xampp/wordpress/wp-content/themes/aaa/js/jquery-1.6.2.min.js', array('jquery'));
wp_enqueue_script('my_javascript_file', 'http://localhost/xampp/wordpress/wp-content/themes/aaa/js/zoommap.js', array('jquery'));
wp_enqueue_script('my_javascript_file', 'http://localhost/xampp/wordpress/wp-content/themes/aaa/js/setup.js', array('jquery'));

1 solution

Refer this links. It may help you to embed javascript in wordpress

http://codex.wordpress.org/Using_Javascript[^]

http://codex.wordpress.org/Function_Reference/wp_enqueue_script[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900