/* * - Add VC_Row classes [with - support theme] * - Add Active Menu class *-------------------------------------------------------------*/ ;(function ( $, window, undefined ) { var pluginName = 'OPN_Scroll', document = window.document, defaults = { vc_version: parseFloat('4.7'), activeItem: 'opn_active_menu', rowClass: 'vc_row', active: '', firstItem: false, };
function opn( element, options ) { this.element = element; this.options = $.extend( {}, defaults, options) ; this._defaults = defaults; this._name = pluginName; this.init(); } opn.prototype.init = function () { var self = this; var p = self._defaults; var ac = p.activeItem;
// Add active class $('a[href*=#]:not([href=#])').bind('click touchstart', function(){ $(this).parent('li').siblings().removeClass( ac ); $(this).parent('li').addClass( ac ); });
if(typeof p.rowClass != 'undefined' && p.rowClass != null) {
// Add THEME Support for VC ROW ID from OPN $('.opn-row-pre-element').each(function(index, el) { var id = $(el).attr('data-id'); var gutter = $(el).attr('data-gutter'); var opn_enable_overlay = $(el).attr('data-opn_enable_overlay') || ''; var opn_hide_navigation = $(el).attr('data-opn_hide_navigation') || '';
// set VC row class from user var $row = $(el).prevAll('.'+p.rowClass+':first');
$row.attr('data-op-gutter', gutter); $row.attr('data-opn_enable_overlay', opn_enable_overlay); $row.attr('data-opn_hide_navigation', opn_hide_navigation); if (id != '') { // Add ID for VC version <= 4.4 /*if( parseFloat(p.vc_version) <= parseFloat(4.4) ) {*/ // Check VC version 4.5 set ROW ID // if not found set OPN ID for row. /* Does not check VC version or Row has ID. * Add ID for row Either VC or OPN. * To fix theme ID's issue. *------------------------------------------------------------*/ var hasID = $row.attr('id') || ''; if(hasID === 'undefined' || hasID === null || hasID==='') { $row.attr('id', id); } /*}*/ } $(el).remove(); }); // Apply for 1 Scroll setTimeout(function(){ $('.'+p.rowClass).each( function(index, elem) { var id = $(elem).attr('id') || null; if(typeof id!= 'undefined' && id != null) { // Get fist Item if( p.firstItem == false ) { p.firstItem = id; $('#'+p.firstItem).addClass('opn-active'); $('#'+p.firstItem).parent().addClass('opn-row-container'); } } }); },700); } }; $.fn[pluginName] = function ( options ) { return this.each(function () { if (!$.data(this, 'plugin_' + pluginName)) { $.data(this, 'plugin_' + pluginName, new opn( this, options )); } }); } $(document).ready(function() { $('body').OPN_Scroll(); // on Visit Scroll to # link var opn_jump = function(e) { var target = 'undefined'; if (e) { e.preventDefault(); if( !$(this).hasClass('.ui-tabs-anchor, .vc_tta-panel-title a, .vc_tta-tab a, .ult_tab_li a, .portfolio-tabs li a, a.scrollup') ) { target = $(this).attr("href"); } } else { target = location.hash; } if (typeof target === 'undefined' || target === '') return false; var gutter = $(target).attr('data-op-gutter'); if (typeof gutter === 'undefined') gutter = 0; $(target).animatescroll({ scrollSpeed: 1000, easing: 'easeOutQuad', padding: gutter }); location.hash = target; $(window).load(function(){ setTimeout(function(){ $(target).animatescroll({ scrollSpeed: 1000, easing: 'easeOutQuad', padding: gutter }); },500); }); } opn_jump(); // Add EXCLUDE - Classes & ID's $('.ui-tabs-anchor, .vc_tta-panel-title a, .vc_tta-tab a, .ult_tab_li a, .portfolio-tabs li a, a.scrollup').addClass('opn-exclude'); /* * on Click / Touch *--------------------------------------------------------*/ // For menu it will works $("a[href*=#]:not('.opn-exclude')").bind('click touchstart', function(){ if (location.pathname.replace(//$/, '') == this.pathname.replace(//$/, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { var id = this.hash.slice(1); var gutter = $('#' + id).attr('data-op-gutter') || 0; $('#' + id).animatescroll({ scrollSpeed: 1000, easing: "easeOutQuad", padding: gutter }); return false; } } }); }); $(document).on('click touchstart', "a[href*=#]:not('.opn-exclude')", function(e) { //$(document).on('click touchstart', 'a[href*=#]:not([href=#]), a[href*=#]:not(".ui-tabs-anchor, .vc_tta-panel-title a, .vc_tta-tab a, .ult_tab_li a, .portfolio-tabs li a, a.scrollup")', function(e) { if (location.pathname.replace(//$/, '') == this.pathname.replace(//$/, '') && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { var scroll_speed = 1000; var scroll_effect = "easeOutQuad"; var id = this.hash.slice(1); // Above settings works JUST for - One Page Navigator - Menu var i = p = ''; $('.opn_fixed .opn_list').each(function(index, element) { var anch = $(element).find('a'); anch.each(function(ind, elm) { var a = $(elm).attr('href'); if(typeof a !== 'undefined' && a != null) { ind = a.split('#')[1]; if(id == ind) { p = $(elm).parent().parent(); scroll_speed = p.attr('data-scroll_speed') || 1000; scroll_effect = p.attr('data-scroll_effect') || "easeOutQuad"; } } }); }); var gutter = $('#' + id).attr('data-op-gutter') || 0; scroll_speed = parseInt(scroll_speed); $('#' + id).animatescroll({ scrollSpeed: scroll_speed, easing: scroll_effect, padding: gutter }); return false; } } }); }(jQuery, window));
Gone are the days of soft pastels, blue for boys and pink for girls. Today’s moms are experimenting with bolder, brighter and more unorthodox colour schemes. Our Synergy 5-in-1 Convertible Cribs are very much equal to this demand. They come in 9 different shades – the conservative white, black, cherry[...]
The post Color your Nursery appeared first on The DOM Family.