Hi,
Im augmenting my theme with some JS, primarily for rounded corners, using JQuery and the rounded corners JQuery plugin.
The rounded corners work for some pages, but on other pages they don't and I get "$(document) has no properties" in firebug.
This happens primarily in pages in which I have put other JS into, but also on the administration page amongst others.
I suspect it is something to do with the JQuery library "clashing" with the drupal JS.
I'm a bit of a JS n00b so I can't pinpoint it. Is there any tricks to importing other JS libraries?
Currently I just do a declaration below the styles declaration in my page.tpl.php
<script type="text/javascript" src="misc/js/jquery-latest.js"></script>
<script type="text/javascript" src="misc/js/jq-corner.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".rounded_corners").corner();
});
</script>
Any tips? Help with good debugging methods? Caches I might need to clear?
Cheers
Comments
jquery47
half_brick,
This is probably REALLY late for you but I've found your post while looking for similar articles.
JQuery is not compatible with Drupal 4.7 - I'm going to try using this module:
http://drupal.org/project/jquery47
that adds compatibility
Did you manage to achieve the rounded corners?