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

 
Maynar replied on at Permalink Reply
Maynar
Yeah I am pretty sure the wait you implemented it on your site won't work.
Your code when rendered looks like this:
<script type="text/javascript" s>@import "/concrete/themes/Beachcroft-CMS/js/main.js"></script>
   <script type="text/javascript" >@import "/concrete/themes/Beachcroft-CMS/js/jquery.js"></script>
   <script type="text/javascript" >@import "/concrete/themes/Beachcroft-CMS/js/corners.js"></script>


Did you change something lately?
liminal replied on at Permalink Reply
I removed the stray 's' - but is this not the correct way to reference the java?
Maynar replied on at Permalink Reply
Maynar
Wow-How-Wait a minute!
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>
liminal replied on at Permalink Reply
<script type="text/javascript" src="<?php echo $this->getThemePath()?>/js/corners.js"></script>
Maynar replied on at Permalink Reply
Maynar
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.....
liminal replied on at Permalink Reply
The code is from here:

http://labs.parkerfox.co.uk/cornerz/...

Is it no good?
Maynar replied on at Permalink Reply
Maynar
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>
liminal replied on at Permalink Reply
Sorry to mess you around - fixed that now.

Still doesn't work though
Maynar replied on at Permalink Reply
Maynar
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:
<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" />
liminal replied on at Permalink Reply
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!