I would like to use jQuery in my Wordpress plugin. I'm trying to load the jquery library using the enqueue script but its throwing an error.
Error: $ is not a function
Here's the code snippet that's inside my main plugin.php file...
function ($post)
{
wp_enqueue_script('jquery');
?>
<script type="text/javascript">
function doTestParse(searchString){
var rx = new RegExp('(?![^<]+>)'+searchString, "gi");
$(this).html($(this).html().replace(rx, '<b>$&</b>'));
}
</script>
<?php ?>