Adding corners to Nav
Permalink
I'm using a Jquery corners download that works fine in regular HTML, but as soon as she goes into eh CMS, doesn't work.
........................................................................................
This is in the head:
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/main.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/corners.js"></script>
<script type="text/javascript">
$(function() {
$('#navigation a').cornerz({radius:5, corners: "tl tr"})
})
</script>
........................................................................................
Here is the test page:
http://www.liminal-design.co.uk/concrete/index.php?cID=1...
It cant be the referencing of the javascript because I tried direct linking to it from the root of the server and it still didn't work.
Any help would be greatly appreciated.
Cheers Guys
........................................................................................
This is in the head:
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/main.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/corners.js"></script>
<script type="text/javascript">
$(function() {
$('#navigation a').cornerz({radius:5, corners: "tl tr"})
})
</script>
........................................................................................
Here is the test page:
http://www.liminal-design.co.uk/concrete/index.php?cID=1...
It cant be the referencing of the javascript because I tried direct linking to it from the root of the server and it still didn't work.
Any help would be greatly appreciated.
Cheers Guys
I removed the stray 's' - but is this not the correct way to reference the java?
Wow-How-Wait a minute!
Java !== JavaScript (not equal too)
Your script inclusion tags should be this:
Java !== JavaScript (not equal too)
Your script inclusion tags should be this:
<script type="text/javascript" src="/concrete/themes/Beachcroft-CMS/js/corners.js"></script>
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/corners.js"></script>
Well the libraries are loaded now. Now there is just one other issue.
I get this in the error console: Error: $("#navigation a").cornerz is not a function
Source File:http://www.liminal-design.co.uk/concrete/index.php?cID=1...
Line: 16
So.. cornerz is not a function.....
I get this in the error console: Error: $("#navigation a").cornerz is not a function
Source File:http://www.liminal-design.co.uk/concrete/index.php?cID=1...
Line: 16
So.. cornerz is not a function.....
It works, but arg.. The code you are using now is no good. Your javascript includes are not properly closed. you forgot the "> tag
You now have: </script>
And it should be closed by this: "></script>
You now have: </script>
And it should be closed by this: "></script>
Sorry to mess you around - fixed that now.
Still doesn't work though
Still doesn't work though
Good that's fixed, but your libraries are loaded before JQuery and it should be loaded afterwards as it depends on JQuery.
Put it behind this chunk of code:
Put it behind this chunk of code:
<link rel="stylesheet" type="text/css" href="/concrete/concrete/css/ccm.base.css" /> <script type="text/javascript" src="/concrete/concrete/js/jquery.js"></script> <script type="text/javascript" src="/concrete/concrete/js/ccm.base.js"></script> <link rel="stylesheet" type="text/css" href="/concrete/concrete/blocks/form/view.css" />
Putting it after but also removing the jquery I was referencing sorted it - as Concrete was already referencing a version of Jquery that ships with the instal.
Thanks so much for your help - your a legend!
Thanks so much for your help - your a legend!
Your code when rendered looks like this:
Did you change something lately?