Skip to content

Instantly share code, notes, and snippets.

View devdays's full-sized avatar

Bruce D Kyle devdays

View GitHub Profile
@devdays
devdays / chaining.html
Created February 23, 2015 00:13
Chaining the result to another jQuery method
<script>
$("#myParagraph").footnote().css("background-color", "yellow");
</script>
@devdays
devdays / jquery.footnoter-0.0.1.js
Created February 22, 2015 21:40
Make footnotes red
(function ($) {
$.fn.footnote = function () {
console.log("footnote");
var footnotes = this.find("span.footnote");
footnotes.css("color", "red");
return footnotes;
};
}(jQuery));
@devdays
devdays / protect-jQuery.js
Created February 22, 2015 21:38
Protecting the $ Alias and Adding Scope
(function ( $ ) {
// use $ in your code as the jQuery alias here
}( jQuery ));
@devdays
devdays / footnoter.0.0.1.html
Last active August 29, 2015 14:15
Sample footnoter html
<!DOCTYPE html>
<html>
<head>
<title>Footnoter</title>
</head>
<body>
<p id="myParagraph">
In up so discovery my middleton eagerness dejection explained. Estimating excellence ye contrasted
insensible as. Oh up unsatiable <span class="footnote">Unpacked reserved sir.</span> interested.
Present suppose in esteems indemesne colonel it to. End horrible she landlord screened stanhill.
@devdays
devdays / jQuery-basic-plugin-greenify.js
Created February 22, 2015 19:02
jQuery Basic Plugin
$.fn.greenify = function() {
this.css( "color", "green" );
};
$( "a" ).greenify(); // Makes all the links green.
<div style="border: 1px solid orange">
<span style="width: 300px; margin-left: 100px; padding: 3px 3px 3px 3px;
background-color: lightgreen">Now is the time for all good men to come to the aid of their country. The quick fox jumped over the lazy dog.</span>
<span style="width: 300px; margin-left: 100px; padding: 3px 3px 3px 3px;
background-color: lightgreen">Now is the time for all good men to come to the aid of their country. The quick fox jumped over the lazy dog.</span>
</div>
@devdays
devdays / css-SeeTheBoxes.css
Created February 16, 2015 21:20
See the boxes on your page
* {
border: 1px solid red !important;
}
@devdays
devdays / css-absoluteboxes.html
Created February 16, 2015 21:06
Demonstrating default behavior of absolute boxes
<div style="width: 300px; border: 1px solid blue">
<div style="position: absolute;
background-color: powderblue;">hello</div>
</div>
<div style="position: relative;">&nbsp;</div>
<div style="width: 300px; border: 1px solid red">
<div style="position: absolute;
background-color: lightgoldenrodyellow">hello there</div>
</div>
<div style="position: relative;">&nbsp;</div>
@devdays
devdays / css-blocklevelboxes.html
Last active August 29, 2015 14:15
Block Level Boxes
<div style="width: 300px; background-color: azure; border: 1px solid blue">
<div style="padding: 20px; background-color: lightgoldenrodyellow">This box has a padding of 20 pixels. Now is the time for all good men to come to the aid of their country. The quick fox jumped over the road.</div>
<div></div>
<div style="padding: 20px; width: 100%; background-color: lightcoral">This box has a padding of 20 pixels and a width of 100%. Now is the time for all good men to come to the aid of their country. The quick fox jumped over the road.</div>
</div>
@devdays
devdays / Redis-OutputCache.xml
Created February 5, 2015 19:03
Redis Output cache pseudo code
<caching>
<outputCache defaultProvider="MyRedisOutputCache">
<providers>
<add name="MyRedisOutputCache"
host = "127.0.0.1" [String]
port = "" [number]
accessKey = "" [String]
ssl = "false" [true|false]
databaseId = "0" [number]
applicationName = "" [String]