Skip to content

Instantly share code, notes, and snippets.

View adesignl's full-sized avatar

Chad Pierce adesignl

View GitHub Profile
@adesignl
adesignl / Search Element insode other element
Created July 17, 2012 22:40
See if element exsist inside of another and if no do somthing...
$('.replys').filter(function() { return !$(this).children('.replyMessage').length; }).hide(); // Hide All Reply Dives That Dont Have Replies
@adesignl
adesignl / resize.js
Created July 19, 2012 02:44
Set And Resize Div on window resize
function mainWindowHeight(){
var search = $('#search');
var work = $('#work');
var bottomPosition = $(window).height();
var usedHeight = '120';
var availableHeight = bottomPosition - usedHeight;
$('#main').height(availableHeight);
}
function overflowPanelHeight (){
@adesignl
adesignl / Fading Loop Jquery Plugin
Created August 24, 2012 13:46
A Fading Loop Juery Plugin By: Justin Talant
// Fading Loop Through Items specified in a container
// --------------------------------------------------
// Usage
// $('#tml-container > p').fadeLoop({
// fadeIn: 6000,
// stay: 3000,
// fadeOut: 6000
// });
(function($) {
@adesignl
adesignl / tweetButton.html
Created January 25, 2013 17:21
Custom Tweet Button
<a href="http://twitter.com/home?status=RT+%40YourTwitterNameHere+Retweet+Button+For+Twitter+That+Mentions+Me+-+http://LinkToYourArticleGoesHere"target="_blank">
<img style="margin-left: 15px; margin-right: 15px;margin-top: 5px; margin-bottom: 5px; float:right" title="Tweet This, Your FriendsWill Love You For It!" src="http://www.YourWebsite.com/tweet-this-button.png"alt="Tweet This, Your Friends Will Love You For It!"/>
</a>
@adesignl
adesignl / cycle.min.js
Created January 29, 2013 16:37
cycle.js
(function(f,e){function g(h){f.fn.cycle.debug&&a(h)}function a(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function m(a,b,q){var d=f(a).data("cycle.opts");if(d){var e=!!a.cyclePause;e&&d.paused?d.paused(a,d,b,q):!e&&d.resumed&&d.resumed(a,d,b,q)}}function k(h,b,d){function k(b,c,h){if(!b&&!0===c){b=f(h).data("cycle.opts");if(!b)return a("options not found, can not resume"),!1;h.cycleTimeout&&(clearTimeout(h.cycleTimeout),h.cycleTimeout=0);t(b.elements,
b,1,!b.backwards)}}h.cycleStop===e&&(h.cycleStop=0);if(b===e||null===b)b={};if(b.constructor==String)switch(b){case "destroy":case "stop":d=f(h).data("cycle.opts");if(!d)return!1;h.cycleStop++;h.cycleTimeout&&clearTimeout(h.cycleTimeout);h.cycleTimeout=0;d.elements&&f(d.elements).stop();f(h).removeData("cycle.opts");if("destroy"==b){b=d;b.next&&f(b.next).unbind(b.prevNextEvent);b.prev&&f(b.prev).unbind(b.prevNextEvent);if(b.pager||b.pagerAnchorBuilder)f.each(b.pagerAnchors||[],function(){this.unbind().remove()
@adesignl
adesignl / appjs.js
Last active December 12, 2015 01:28
Jquery-RSS with ie7/ie8 fix
// RSS Feed Reader
$("#rss-feeds").rss( "RSSURLHERE", {
limit: 3,
ssl: false,
layoutTemplate: '<div class="feed-container">{entries}</div>',
entryTemplate: '<div class="entry"><h5><a href="{url}">{title}</a></h5><p>{shortBodyPlain}</p></div>'
});
@adesignl
adesignl / You-Tube-Modal
Created February 22, 2013 15:14
Reveal Modal Player for youtube videos
****
This Script Set was designed to use the latest version of foundation Reveal Modal
By Zurb. You can easily use the modal seperatly from the other framework.
You might have to make
****
**** Link ****
<a class="feature-modal-btn" href="#YTMODAL" data-ytvideoid="YOUTUBE VIDEO ID NUMBER">LINK TEXT OR IMAGE</a>
@adesignl
adesignl / Hubspot Unsubscribe
Created March 28, 2013 17:30
Hubspot Unsubscribe Button
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/foundation_icons_general/stylesheets/general_foundicons.css">
@adesignl
adesignl / Hubspot-Foxboro-Layouts
Last active December 16, 2015 04:48
Hubspot Foxboro Layouts
/* ----------------------------------
General Layout Items
---------------------------------- */
div.pad {
padding: 0 !important;
margin: 0 !important;
}
/* ----------------------------------
Layouts
@adesignl
adesignl / SlideBGChangeScript.js
Last active December 16, 2015 05:19
Cycle Slider Change the slider / or body class based on slide number
jQuery(function($){
// Slider
$('.slider').cycle({
timeout: 8000,
pause : true,
prev : '#prev',
next : '#next',
after: slideBgChange