Using own js scripts
-
Hello,
I want to use some jquery plugins in wordpress. So i searched a bit and found how to add script to wordpress header.
On wp-includes/ theres a file called script-loader.php
I added
$scripts->add( ‘jquery-watermarkinput’, ‘/wp-includes/js/jquery/jquery.watermarkinput.js’, array(‘jquery’), ‘0.1’ );
To call this js under jquery’s js.Now i have to add a script on my body to use this plugin, which will be like;
<script type=”text/javascript”>
$(document).ready(function(){
$(“#s”).Watermark(“search..”);
)};
</script>I added it to my header.php after </head> element but after i run my page i saw an syntax error in file called tw-sack.js which is a wordpress file.
I need your help to achieve this problem. I look around codex but i didint find anything.
Thanks
The topic ‘Using own js scripts’ is closed to new replies.