Coder Wrap provides free to use snippets
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Themes
Tools
Open menu
CSS Text Shadow Generator
CSS Box Shadow Generator
Image Color Change Using CSS Filter
Word and Character Count
All Snippets
Open menu
Accordions
CSS3
Forms
Gallery
HTML
Images Effects
LightBox
Menu & Nav
Others
Popular
Popup & Model Popup
Sliders
Tabs
Web Elements
Open menu
About Page Options
Banners Options
Blogs Options
Brands Options
Common Options
Ecommerce Options
Follow Us Options
Gallery Options
Home Page Sections Options
Inner Banners Options
Instagram Section Options
Newsletters Options
Plans Options
Services Options
Team Options
Testimonials Options
Videos Options
Back to Web elements
Preview
Source Code
(
1
)
Download
0){for(;(match=regex.exec(bv_bg_style))!==null;){let new_img_url=getNewImageUrlSVG(new_url,bv_webp_status,property_value,entry2.target.getBoundingClientRect());bv_bg_style=bv_bg_style.replace(match[1],new_img_url)}let new_bv_bg_style=entry2.target.getAttribute("style")||"";new_bv_bg_style=new_bv_bg_style+(new_bv_bg_style?";":"")+(bv_bg_style||""),entry2.target.setAttribute("style",new_bv_bg_style)}else{for(;(match=regex.exec(property_value))!==null;){let new_img_url=getNewImageUrlSVG(new_url,bv_webp_status,property_value,entry2.target.getBoundingClientRect());property_value=property_value.replace(match[1],new_img_url)}entry2.target.style.setProperty(property_type,property_value,"important")}}}bvObservedNodesWithCounter.delete(entry2.target),other_image_observer.unobserve(entry2.target)}})}__name(handleOtherImages,"handleOtherImages");function handleIframesV2(entries){entries.map(entry2=>{entry2.isIntersecting&&(set_iframe_element_src_v2(entry2.target),iframe_observer_v2.unobserve(entry2.target))})}__name(handleIframesV2,"handleIframesV2");const bvCheckNode=__name((node,currentLevel=1,maxLevel=1/0)=>{if(node.nodeType===1){const className=node.getAttribute("class");if(node.nodeName==="IFRAME"&&typeof className=="string"&&className.includes("bv-lazyload-iframe"))iframe_observer_v2.observe(node);else{const computedStyle=getComputedStyle(node),background=computedStyle.getPropertyValue("background")||"none",backgroundImage=computedStyle.getPropertyValue("background-image")||"none";backgroundImage!=="none"&&backgroundImage.match(/url\(/)?(get_bv_identifier(backgroundImage,"bv-img-url")||get_bv_identifier(backgroundImage))&&bvObserveImgNode(node):background!=="none"&&background.match(/url\(/)?(get_bv_identifier(background,"bv-img-url")||get_bv_identifier(background))&&bvObserveImgNode(node):typeof className=="string"&&className.includes("bv-lazyload-bg-style")?bv_style_observer.observe(node):typeof className=="string"&&className.includes("bv-lazyload-tag-img")?img_observer.observe(node):typeof className=="string"&&className.includes("bv-lazyload-picture")&&picture_lazy_observer.observe(node)}}currentLevel
{bvCheckNode(childNode,currentLevel+1,maxLevel)})},"bvCheckNode");function bv_handle_mutations(mutations){mutations.forEach(mutation=>{if(mutation.type==="childList"&&mutation.addedNodes.length)mutation.addedNodes.forEach(node=>{setTimeout(function(){bvCheckNode(node)},0)});else if(mutation.type==="attributes"){const targetNode=mutation.target,attributeName=mutation.attributeName,attributeValue=targetNode.getAttribute(attributeName);if(attributeName==="style"&&targetNode.style.backgroundImage!==mutation_observer.prevBackgroundImage){const computedStyle=getComputedStyle(targetNode),background=computedStyle.getPropertyValue("background")||"none",backgroundImage=computedStyle.getPropertyValue("background-image")||"none";backgroundImage!=="none"&&backgroundImage.match(/url\(/)?(get_bv_identifier(backgroundImage,"bv-img-url")||get_bv_identifier(backgroundImage))&&bvObserveImgNode(targetNode):background!=="none"&&background.match(/url\(/)&&(get_bv_identifier(background,"bv-img-url")||get_bv_identifier(background))&&bvObserveImgNode(targetNode)}else attributeName==="class"&&setTimeout(function(){bvCheckNode(targetNode)},0)}})}__name(bv_handle_mutations,"bv_handle_mutations");function handle_mod_key_nodes(){let node_elements=document.querySelectorAll("[bv-img-mod-key]");for(let i=0;i
{setTimeout(function(){bvCheckNode(_element,1,1)},0)})}__name(handleLazyloadedStyleImages,"handleLazyloadedStyleImages");let other_image_observer,iframe_observer_v2,mutation_observer;var bvDynamicImageObserverOptions={rootMargin:"200px 0px",threshold:.01};function bvStartDynamicImageLazyload(image_format_status){bv_webp_status=image_format_status,handle_mod_key_nodes(),"IntersectionObserver"in window&&(other_image_observer=new IntersectionObserver(handleOtherImages,bvDynamicImageObserverOptions),iframe_observer_v2=new IntersectionObserver(handleIframesV2,bvDynamicImageObserverOptions)),"MutationObserver"in window&&(mutation_observer=new MutationObserver(bv_handle_mutations),mutation_observer.prevBackground="",mutation_observer.prevBackgroundImage="",mutation_observer.observe(document.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0})),"IntersectionObserver"in window&&"MutationObserver"in window&&window.addEventListener("load",event=>{for(const event2 of bv_lazyload_events)window.addEventListener(event2,handleLazyloadedStyleImages,{once:!0})})}__name(bvStartDynamicImageLazyload,"bvStartDynamicImageLazyload"),getImageOptimizationFormatSupport(bvStartDynamicImageLazyload);