WebsiteBaker Community Forum
WebsiteBaker Support (2.8.x) => jQuery => Topic started by: topper 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
-
this is the code in your preset?
$(".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:
$(".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
-
thanks again dbs
there is something i cant find out
-
must work:
look (http://test.onkel-franky.de/branches/pages/corners/corner2.php)
try 1 preset on 1 site.
preset contains this:
<!-- 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:
});
-
fine
i made 2 different presets with 2 names that was wrong one is enough.
thanks a lot again