Webflow sync, pageviews & more.
NEW

Add Random Sticker to Page on Click

Example

Add Random Sticker to Page on Click

Description

A fun unique way of adding a random sticker to your Webflow site on click.

Instructions

  1. Add the CSS code snippet to the head section of your custom code settings
  2. Add the Javascript code to your closing body tag
  3. Update the class names to your relevant classes

Javascript snippet


<!-- Add to closing body section -->
<script>
// © Code by T.RICKS, https://www.tricksdesign.com/
// Copyright 2020, T.RICKS, All rights reserved.
// You have the license to use this code in your projects but not to redistribute it to others

var lastEq = $( ".tricks-stickers .tricks-sticker" ).length - 1;
var stickerEq = -1;

$( "body" ).click(function(e) {
	
	if (stickerEq == lastEq) {
  	stickerEq = 0;
  } else {
  	stickerEq++;
  };
  
  var tricksSticker = $( ".tricks-stickers .tricks-sticker" ).eq(stickerEq).clone().appendTo( ".overflow" );
  var marginLeft =  e.pageX - (tricksSticker.width() / 2);
  var marginTop = e.pageY - (tricksSticker.height() / 2);
  tricksSticker.css({'margin-left': marginLeft, 'margin-top': marginTop, 'transform': 'scale(1, 1)'});
  
  // Wait before playing animation
	setTimeout(() => {  
		tricksSticker.addClass('sticker-hide');
	}, 2000);
  
});

</script>

CSS snippet


<!-- Add to header settings -->
<style>
.tricks-stickers {
	display: none !important;
}

.tricks-sticker {
  position: absolute !important;
  left: 0% !important;
  top: 0%  !important;
  z-index: 9999999 !important;
  pointer-events: none; !important;
  transform: scale(0.8, 0.8);
  transition-property: transform;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

.sticker-hide {
	transform: scale(0, 0) !important;
}

.overflow {
	overflow: hidden !important;
  position: relative !important;
}

</style>

HTML snippet

Custom Diamond List Bullet Shape

Custom Diamond List Bullet Shape

4

Instead of the default circle for your Webflow list items this CSS snippet allows you to add a diamond as an alternative design.

SVG Clip-path for Custom Image Cropping

SVG Clip-path for Custom Image Cropping

Create a responsive clip path for images using SVG shapes in Webflow.This allows you to create unique shaped images using SVG paths rather than DIVs or similar methods.

Prevent Input Zoom Scaling on Mobile

Prevent Input Zoom Scaling on Mobile

Prevent an input form zoom scaling on mobile on your Webflow site. This allows for a better user experience based on your sites design rather than mobile OS zoom default properties.

International Flags Phone Number Input

International Flags Phone Number Input

Add international flags to a phone number for input in Webflow. Adding this allows for a unique way of adding international flags to a phone form field in your Webflow site.

Disable/Enable Clicking on Element

Disable/Enable Clicking on Element

Control which elements can or cannot be clicked on your Webflow site with this simple CSS code snippet.

Truncate multi-line text with Ellipse

Truncate multi-line text with Ellipse

Do you want consistency with your Webflow designs? Truncate multi-line texts with ellipses based on 2 or 3 lines of your choosing via CSS. This helps keep your designs uniformed without needing to set max height limitations by truncating text that goes beyond a certain length.

Custom Select Styling Multi-Select Input

Custom Select Styling Multi-Select Input

Design your own dropdowns and multi-select inputs in Webflow using Select2. With this Javascript code you'll be able to customize the look and design of the multi-select from the native browser select.

Custom Slider Dot Color

Custom Slider Dot Color

Easily change the native Webflow slider element navigation/dot colors with this CSS snippet. This method allows you to easily select the colors of Webflow's native slider dots via a CSS code snippet.

DRAG
Real-time sorting by
Disable/Enable Clicking on Element

Disable/Enable Clicking on Element

Control which elements can or cannot be clicked on your Webflow site with this simple CSS code snippet.

Split Text into Lines

Split Text into Lines

Easily split text into lines based on lines, words, characters on your Webflow site. A great way to add interactions based on your own specifications to text on your Webflow site.

Play Background Video on Hover

Play Background Video on Hover

Play a background video when a user hovers over the video on your Webflow site.

Change Active Webflow Tab

Change Active Webflow Tab

Change the default Webflow active tab on your Webflow site with this custom Javascript code.

Split CMS Collection into Multiple Sections

Split CMS Collection into Multiple Sections

Split up your Webflow CMS collections into multiple sections with this Javascript code snippet. This allows you to easily break up a collection lists into multiple sections, a great way of adding your own elements in between a Webflow CMS collection list.

Number of CMS Item Count

Number of CMS Item Count

A simple way of displaying the number of CMS items on a page in Webflow. If you ever wanted to add a CMS item count on a page this script will allow you to easily display the total number of items shown.

Force Links to Inherit Parent Font Color

Force Links to Inherit Parent Font Color

Force your Webflow site links to inherit the parent font color with this simple CSS code snippet. This makes it easier for you to manage your link color on Webflow.

Force Safari to Respect Border Radius on Images & Videos

Force Safari to Respect Border Radius on Images & Videos

Safari will often not respect border radiuses on images and videos. With this CSS code snippet you can force Safari to respect border radius on images and videos on your Webflow site.

DRAG
Real-time sorting by