Please duplicate this post to add the new resource and replace the content with your information
Read More / Read Less
Auto Shrink Main Nav and Sticky Main Nav
Problem
This is our new effect for main nav that some of you might already seen it. The action is when people scroll down the window, the main navigation will reduce its size to be smaller. This effects can apply only Phoenix.
Solution
Add this script to code snippet (set the location to global footer)
<script>
$(document).ready(function(){
$(window).scroll(function(){
scrollheight = $('body').height();
if($(window).scrollTop() + $(window).height() == $(document).height()) {
$('.scrolldown').fadeOut();
} else {
$('.scrolldown').fadeIn();
if($(document).scrollTop() > 0){
jQuery("header").addClass('smaller');
}
else {
jQuery("header").removeClass('smaller');
}
}
});
jQuery(".scrolldown").click(function() { jQuery("html, body").animate({ scrollTop: $(window).scrollTop() + 500 }, "slow");});
});
</script>
Write the css to config the .small when it's been added by script when scrolling
header.
MixItUp 3
A high-performance, dependency-free library for animated filtering, sorting, insertion, removal and more...
Example
http://www.contactpointe.com/find-a-location/
How to use library
Download the library from https://www.kunkalabs.com/mixitup-multifilter/ or grab it here
Here's the script you have to add it to a code snippet:
<script>
var $ = jQuery.
Select Country And State With Gravity Form
Example Site
http://youthshootingsa.pi.bypronto.com/
References
http://www.cssscript.com/demo/generic-country-state-dropdown-list-countries-js/
Step 1:
Add ajax="true" to the shortcode of the gravityform that you want to use.
[ gravityform id="4" title="false" description="false" ajax="true" ]
Step 2:
Create new snippet and add this script: https://github.
Embed Facebook Comment On Each Post
Problem
Client would like to embed Facebook comments plugin on each post for lets people comment on the post page by using their Facebook account.
Please see example here: https://www.gedgoodlife.com/health/3296-ไซนัสอักเสบ/
Solution
Step 1 : Generate Facebook Comments Plugin Code
Here is the link to generate the Facebook Comments Plugin code: https://developers.
An Alternative JS Filter That Can Work with Title (No Fancy Animation)
Problem
Client want a simple filter that can be use with the title of each news & events. At first, I was about to use MixItUp but that's mean we need to put each title into "data-" attribute which will be double work for the team when update.
Solution
Download script here
Build up a list and input field
<form name="filterform">
<label>Filter<input type="text" name="filterinput" id="filterinput"></label>
<input type="button" name="clear" value="Clear" id="clearfilter">
</form>
<ul id="mylist">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ul>
Embed main script (jquery.
Jumpdown for TMT
Problem
TMT Client change from basic header to fix header so we need new jump library to make thing work
This script build based on the Jumpdown without library script
New script fix the double header issue but don't forget to add hash-menu class to a jumpdown item inside menu
Solution
Add this script to initiate jumpdown
Also add this script to remove hash from homepage
Disable Menu Which Have No Link
Problem
There are parent pages without the link, and we don't need them redirection to blank page when clicking on main menu. So we have to disable the link on both of menu item in main navigation and option in select field (on tablet and mobile) as well.
Hamburger Menu for Everyone! (mmenu)
Please duplicate this post to add the new resource and replace the content with your information
Scrollbar Customization (Nicescroll jQuery Plugin)
Please duplicate this post to add the new resource and replace the content with your information
- 1
- 2