Author Topic: CurvyCorners  (Read 3363 times)

Offline topper

  • Posts: 24
CurvyCorners
« on: October 03, 2010, 07:59:34 PM »
Hello,

Nice plugin and works fine.

Is it possible to use two different set at the same WYSIWYG site ?
I tried to change jquery name and css rules but didnt get it to work.

rgrds topper

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: CurvyCorners
« Reply #1 on: October 03, 2010, 08:20:45 PM »
this is the code in your preset?
Code: [Select]
$(".roundedCorners").each(function() {
      $(this).wrap('<div class="rounded" style="background:url(' + $(this).attr('src') + ') no-repeat center center;" />');
      //width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;
      if ( $(this).width() != "" ) { $(this).parent().css("width", $(this).width() + "px" ); }
      if ( $(this).height() != "" ) { $(this).parent().css("height", $(this).height() + "px" ); }
      $(this).hide();
    });
    $('.rounded').ccorner({
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,
    });

maybe:
copy the original and paste it below, than change the classes to:

Code: [Select]
$(".roundedCorners2").each(function() {
      $(this).wrap('<div class="rounded2" style="background:url(' + $(this).attr('src') + ') no-repeat center center;" />');
      //width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;
      if ( $(this).width() != "" ) { $(this).parent().css("width", $(this).width() + "px" ); }
      if ( $(this).height() != "" ) { $(this).parent().css("height", $(this).height() + "px" ); }
      $(this).hide();
    });
    $('.rounded2').ccorner({
          tl: { radius: 20 },
          tr: { radius: 20 },
          bl: { radius: 20 },
          br: { radius: 20 },
          antiAlias: true,
          autoPad: true,
    });

and give your pics the class roundedCorners2

Offline topper

  • Posts: 24
Re: CurvyCorners
« Reply #2 on: October 03, 2010, 09:28:38 PM »
thanks again dbs

there is something i cant find out






« Last Edit: October 03, 2010, 10:24:30 PM by topper »

Offline dbs

  • Betatester
  • **
  • Posts: 8076
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: CurvyCorners
« Reply #3 on: October 03, 2010, 09:49:37 PM »
must work:
look

try 1 preset on 1 site.
preset contains this:
Code: [Select]
<!-- position: head -->
    <script type="text/javascript" src="{WB_URL}/modules/jqueryadmin/plugins/CurvyCorners/jquery.curvycorners.min.js"></script>
<!-- position: head -->
    <script type="text/javascript">
    $(document).ready(function() {
    $(".roundedCorners").each(function() {
      $(this).wrap('<div class="rounded" style="background:url(' + $(this).attr('src') + ') no-repeat center center;" />');
      //width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;
      if ( $(this).width() != "" ) { $(this).parent().css("width", $(this).width() + "px" ); }
      if ( $(this).height() != "" ) { $(this).parent().css("height", $(this).height() + "px" ); }
      $(this).hide();
    });
    $('.rounded').ccorner({
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,
    });
    $(".roundedCorners2").each(function() {
      $(this).wrap('<div class="rounded2" style="background:url(' + $(this).attr('src') + ') no-repeat center center;" />');
      //width: ' + $(this).width() + 'px; height: ' + $(this).height() + 'px;
      if ( $(this).width() != "" ) { $(this).parent().css("width", $(this).width() + "px" ); }
      if ( $(this).height() != "" ) { $(this).parent().css("height", $(this).height() + "px" ); }
      $(this).hide();
    });
    $('.rounded2').ccorner({
          tl: { radius: 20 },
          tr: { radius: 20 },
          bl: { radius: 20 },
          br: { radius: 20 },
          antiAlias: true,
          autoPad: true,
    });
  });
    </script>
// ----- insert your custom code here -----

i think you have on site 2 forgot this at the end:
Code: [Select]
});
« Last Edit: October 03, 2010, 09:55:33 PM by dbs »

Offline topper

  • Posts: 24
Re: CurvyCorners
« Reply #4 on: October 03, 2010, 10:06:42 PM »
fine

i made 2 different presets with 2 names that was wrong one is enough.

thanks a lot again