Skip to content

Instantly share code, notes, and snippets.

@aliaghdam
aliaghdam / visual-composer-rtl-fix.js
Last active February 5, 2022 09:34
WordPress Visual Composer full width row ( stretche row ) fix for RTL
jQuery(document).ready(function() {
function bs_fix_vc_full_width_row(){
var $elements = jQuery('[data-vc-full-width="true"]');
jQuery.each($elements, function () {
var $el = jQuery(this);
$el.css('right', $el.css('left')).css('left', '');
});
}
@makfruit
makfruit / ecw_get_productid.js
Created December 13, 2011 06:40
A script for Ecwid to determine a product ID of a product page being displayed
// Add handler for Ecwid's OnPageLoad event
if (
typeof(Ecwid) == 'object'
&& typeof(Ecwid.OnPageLoad) == 'object'
) {
Ecwid.OnPageLoad.add(function(page) {
// Determine a product ID and do necessary actions
if (
typeof(page) == 'object'
&& 'PRODUCT' == page.type