The replace function I'm using works as I've tested it in the console but it does not work at all on blur. How can I fix that?
<script type="text/javascript">
//Ensure spaces are not entered between tags
jQuery(document).ready(function(){
jQuery('#item_keywords').blur(function(){
$(this).val().replace(/^\s+$/,"");
});
});
</script>
you have removed the spaces but u have not assigned them any where :)