DIVI, Snippets
diviLinks = et_link_options_data; for (let i = 0; i < diviLinks.length; i++) { let item = diviLinks[i]; let itemClass = item.class; let itemUrl = item.url; console.log(itemClass + " " + itemUrl) $('.' + itemClass).attr('data-url', itemUrl) }DIVI, Snippets
/* Automatically set the image Title & Alt-Text upon upload*/ add_action( ‘add_attachment’, ‘my_set_image_meta_upon_image_upload’ ); function my_set_image_meta_upon_image_upload( $post_ID ) { // Check if uploaded file is an image, else do...DIVI, Snippets
$(document).on(‘click’, “.open-menu”, function(e){ $(‘body’).toggleClass(‘et_pb_fullscreen_menu_active’); $(‘.et_slide_in_menu_container’).toggleClass(‘et_pb_fullscreen_menu_opened’);...DIVI, Snippets
Article $(window).load(function(){ // find the hash in the URL and removes the # var et_hash = window.location.hash.substr(1); var et_filter = $( ‘.et_pb_portfolio_filter a[data-category-slug=”‘ + et_hash + ‘”]’ );...DIVI, Snippets
(function(){ // Override the addClass to prevent fixed header class from being added var addclass = jQuery.fn.addClass; jQuery.fn.addClass = function(){ var result = addclass.apply(this, arguments);...DIVI, Snippets
//——- DIVI FORM REQUIERED ASTERISK ———– $(‘input[data-required_mark=”required”]’).each(function(){ var placeH = $(this).attr(‘placeholder’); var newPlaceH = placeH + ‘ *’;...