This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- HTML code is just for reference, you can modify the code and structure based on whatever you need, so elements are added to keep the javascript working on wordpress too, you can remove it and remove the children[0] too accordingly | |
## For WordPress, Use Elementor, | |
1. add a button widget, | |
2. add a id as ctaBtn to button widget | |
3. add a button text and append it with <span> Disabled Text </span> (replace the disabled text with whatever message you want to be there while button is disabled with the main button text | |
4. add a html widget and paste the script code from this gist there. | |
5. in script, you can change settings like timeout time (in milliseconds) and if you set another id or there is a different structure in html, you need to change css selector in query selector too. | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="swiper mySwiper"> | |
<div class="swiper-wrapper" id="swiper-wrapper1"></div> | |
<div class="swiper-pagination"></div> | |
<div class="swiper-button-next"></div> | |
<div class="swiper-button-prev"></div> | |
</div> | |
<style> | |
.swiper-pagination { | |
width: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Force HTTPS on all pages | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTPS} !on | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
</IfModule> | |
# BEGIN WordPress | |
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are | |
# dynamically generated, and should only be modified via WordPress filters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
//Center Width | |
function calcWidth(id) { | |
var h = document.getElementById(id).clientWidth; | |
var hh = h / 2; | |
document.getElementById(id).style.marginLeft = "-" + hh + "px"; | |
} | |
window.onload = calcWidth("name"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
function addLink() { | |
var body_element = document.getElementsByTagName('body')[0]; | |
var selection; | |
selection = window.getSelection(); | |
var pagelink = "<br /><br /> Read more at: <a href='"+document.location.href+"'>"+document.location.href+"</a><br />Copyright &copy; EasyTins"; // change this if you want | |
//The Script Created by https://facttuts.com | |
var copytext = selection + pagelink; | |
var newdiv = document.createElement('div'); | |
newdiv.style.position='absolute'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_copyright_text() { | |
if (is_single()) { ?> | |
<script type='text/javascript'> | |
function addLink() { | |
if ( | |
window.getSelection().containsNode( | |
document.getElementsByClassName('entry-content')[0], true)) { | |
var body_element = document.getElementsByTagName('body')[0]; | |
var selection; |