Skip to content

Instantly share code, notes, and snippets.

View fleimisch's full-sized avatar

Nate Fleimisch Bezlaj fleimisch

  • Slovenia
View GitHub Profile
@fleimisch
fleimisch / HTMLTags-All
Created September 7, 2016 23:17
List of all HTML Tags
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
@fleimisch
fleimisch / gDrop SCE Dropdown.html
Last active April 7, 2017 23:40
gDrop SCE Dropdown example: change vehicle on home page block search popup
<div class='someWrapper'>
<div class='gDrop' data-trigger='parent' data-target='-2' data-align='right'></div>
</div>
@fleimisch
fleimisch / SwiperWidthIssueFix.js
Created June 4, 2016 20:59
Swiper Width Issue Fix
$(window).on("throttledresize", function (event) {
$('.srSubCatSl').hide();
$('.srSubCatSl').width(0); $('.srSubCatSl').width($('.srSubCatSl').parent().width());
$('.srSubCatSl').show();
if (typeof subCatSl != "undefined") {subCatSl.update(true);}
});
window.addEventListener("orientationchange", function () {
$('.srSubCatSl').hide();
$('.srSubCatSl').width(0); $('.srSubCatSl').width($('.srSubCatSl').parent().width());
$('.srSubCatSl').show();
@fleimisch
fleimisch / JSBreakPoint Detect
Created April 27, 2016 20:05
Javascript detect breakpoint
$(document).bind('breakpointChanged', function () {
});
@fleimisch
fleimisch / WindowTabFocusBlur
Created April 19, 2016 12:08
Detect Window/Tab focus or blur // switching tabs
$(window).TabWindowVisibilityManager({
onFocusCallback: function(){
// tween resume() code goes here
},
onBlurCallback: function(){
// tween pause() code goes here
@fleimisch
fleimisch / SCEDefaultCSSNames
Last active September 22, 2015 22:28
SCE Default CSS Names
/* Header Main Navigation Links */
.headermainnav a {}
.headermainnav a:hover {}
.headermainnavHighlight a {}
.headermainnavHighlight a:hover {}
/* Default Input Boxes */
.DefaultInput {border:1px solid #ccc; font-size:13px; line-height:16px; padding:5px 3px; height:28px; background:white; -moz-border-radius: 2px;-webkit-border-radius: 2px;-khtml-border-radius: 2px;border-radius: 2px;}
.DefaultSelect {border:1px solid #ccc; font-size:13px; line-height:24px; padding:2px 1px; height:24px; background:white; -moz-border-radius: 2px;-webkit-border-radius: 2px;-khtml-border-radius: 2px;border-radius: 2px; height:28px;}
@fleimisch
fleimisch / Content No Spaces Only
Created June 11, 2015 15:11
Check if content is not SPACES ONLY
if ( (jQuery.trim($('.SubThankYouMes').html())).length > 0 ) {
// do stuff here
}
@fleimisch
fleimisch / decodeEntities
Last active August 29, 2015 14:22
decodeEntities
Decode Entities function is supported natively in SCE.
Example Call:
decodeEntities($('.tempSubBoxThankYou').html())
@fleimisch
fleimisch / Rename Attribute Name
Created May 22, 2015 14:11
Rename Attribute Name
jQuery.fn.extend({
renameAttr: function (name, newName, removeData) {
var val;
return this.each(function () {
val = jQuery.attr(this, name);
jQuery.attr(this, newName, val);
jQuery.removeAttr(this, name);
// remove original data
if (removeData !== false) {
jQuery.removeData(this, name.replace('data-', ''));
@fleimisch
fleimisch / SCEJSEvents
Last active July 2, 2021 16:50
SCE Available JS Events
// PURE JS VERSION NEW:
var event = new CustomEvent("TEALoaded");
document.dispatchEvent(event);
document.addEventListener('TEALoaded', function(e) {alert("tealoaded")});
// example event creation
jQuery.event.trigger('onMegaMenuOpen');