Im fairly new to using Umbraco and Tea Commerce so forgive my ignorance but i seem unable to figure out why in my main master page i cannot use a simple script tag to use jQuery.
i get no error in firbug error console, it just seems not to be hitting the juery. I can see the relavent links to the core Jquery .js file, so its referenced correctly as other functionality on the site works fine.
Ive tried putting this jueary code within one of the other .js files i.e. teacommerce_siple.js but again it doesnt seem to hit the jQuery.
Should i be doing something different to make jquery work?
Any help would be greatly appreciated, it must me be a simple fix?
Simple jQuery in MainMasterpage?
Hi
Im fairly new to using Umbraco and Tea Commerce so forgive my ignorance but i seem unable to figure out why in my main master page i cannot use a simple script tag to use jQuery.
The code id like to use is
<script type="text/javascript">
$(document).ready(function() {
$('.ContactForm').hide();
$('#SeeContactForm').click(function() {
$('.ContactForm').slideToggle('slow', function() {
});
});
});
</script>
i get no error in firbug error console, it just seems not to be hitting the juery. I can see the relavent links to the core Jquery .js file, so its referenced correctly as other functionality on the site works fine.
Ive tried putting this jueary code within one of the other .js files i.e. teacommerce_siple.js but again it doesnt seem to hit the jQuery.
Should i be doing something different to make jquery work?
Any help would be greatly appreciated, it must me be a simple fix?
Kind Regards
Neil.
Hi Neil,
Have you checked your page source code, to see if your code is there at all :)
Also try opening your script and setting a breakpoint in firebug, or whatever browser you are using.
You could also try removing your code and inserting a simple alert('BANG') to see if that's run.
If none of that works I might need a link to be able to debug it myself.
/Rune
Hi
Thanks for the reply, ive had a play around and its working fine now.
No idea why it woudlnt work i literally refreshed the page a few times and it started working, maybe a cache issue?
Sods law as soon as i posted this question it started working, thanks for your help though :)
Neil.
is working on a reply...