i am working on a jsfiddle and have selected that the framework used is 'onload, jquery 1.8.2'.
i have also called in the following resources:
- jquery.multipage.js
- jquery.validate.min.js
both these scripts, as well as the html and css defined in jsfiddle, are outputting the expected results.
i am also however trying to add some pure javascript to achieve some onfocus and onblur effects.
my question is:
with the above environment, how do i add the following javascript to the jsfiddle:
<script type="text/javascript">
function clearText(field){
if (field.defaultValue == field.value) field.value = '';
else if (field.value == '') field.value = field.defaultValue;
}
</script>
the jsfiddle in its current state is here:
http://jsfiddle.net/eJKQn/139/
thank you.