I just upgraded my jquery.corner.js from v1.7 (the version this module's "INSTALL.txt" links) to v1.92 and it's working great. 1.92 can be downloaded from the following site:

http://jqueryjs.googlecode.com/svn/trunk/plugins/corner/jquery.corner.js (via)

My question is this: I'm using jquery.corner.js outside of this module and want to get nested corner elements in place. This would permit a kind of border around your rounded sidebar, or whatever you are rounding (screenshot).

I made a rather pitiful attempt today and Drupal freaked out ("Parse error: syntax error, unexpected T_STRING in /my-path/template.php on line 312").

The modification I made to my code is highlighted below (works fine without the emboldened text):

drupal_add_js('scripts/jquery.corner.js');

drupal_add_js(
'$(document).ready(function() {
$("div#sidebar-left").corner("round 12px").parent().css('padding', '4px').corner("round 10px");
});',
'inline'
);

Can anyone help me out? My JS skills are pretty weak and I haven't turned anything up in my searches today.

Comments

silurius’s picture

Simple fix. The single quotes generally work fine on an HTML page such as the source above, but will break a Drupal PHP page. So here is a working replacement for the blockquoted code above:

drupal_add_js('scripts/jquery.corner.js');

drupal_add_js(
'$(document).ready(function() {
$("div#sidebar-left").corner("round 12px").parent().css("padding", "4px").corner("round 10px");
});',
'inline'
);

silurius’s picture

Assigned: Unassigned » silurius
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.