JQuery Rounded Corners
Hey guys,
I'm trying to use JQuery rounded corners (http://jquery.malsup.com/corner/) on a Master page so that i can get rounded corners on a div. However I can't seem to get it to work. Here is my approach to it. I've registered JQuery on the masterpage as well as the JS file that I want to use in the head tag. I placed the JS just before the end of the form tag.
Registered the JS i'm supposed to use.
<
script
type
=
"text/javascript"
language
=
"javascript"
src
=
"https://raw.github.com/malsup/corner/master/jquery.corner.js"
></
script
>
<
script
type
=
"text/javascript"
language
=
"javascript"
>
$(document).ready(function ()
$('#articletitle').corner();
);
</
script
>
</form>
Have you tried loading up firebug and calling the command against a bunch of elements?
$('#articletitle').corner();
...to see if it generates any errors?
Hi Jester,
By some reason the JQuery is not registered correctly when using the approach from the link that you are referring to. As an alternative I can suggest you to use the standart jQuery plugin for rounded corners which can be downloaded from here.
Here's a sample code to round the corners of a div located in a Master page:
<
script
type
=
"text/javascript"
src
=
"js/jquery-1.6.2.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"js/jquery.corner.js"
></
script
>
<
script
type
=
"text/javascript"
>
$(function ()
$("#content").corner()
);
</
script
>
<
div
id
=
"content"
style
=
"background-color:Blue"
>
Hello this would have rounded corners</
div
>
<
div
>
<
asp:ContentPlaceHolder
ID
=
"ContentPlaceHolder1"
runat
=
"server"
>
</
asp:ContentPlaceHolder
>
</
div
>
<
script
type
=
"text/javascript"
src
=
"js/jquery-1.6.2.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"js/jquery.corner.js"
></
script
>
Hey Veronica,
Thanks for your response. I have attempted your solution and it has worked. I believe the issue was also some other JS that existed on the masterpage. I have Google Analytics and i believe that was conflicting with it, not sure how but still trying to figure it out.
Steve thanks again for your assistance in that matter I did try what you suggested and it did help me out.