This file contains hidden or 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
{exp:channel:categories style="linear"} | |
<h2>{category_name}:</h2> | |
{exp:channel:entries channel="agent_forms" category="{category_id}" dynamic="no"} | |
{title}<br> | |
{body} | |
{/exp:channel:entries} | |
{/exp:channel:categories} |
This file contains hidden or 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
// usage | |
// url: http://jsfiddle.net/?test=pirates%20&%20ninjas | |
// url: http://jsfiddle.net/?test=pirates & ninjas | |
var vars = [], hash; | |
var q = document.referrer.split('?')[1]; | |
if(q != undefined){ | |
q = q.replace("%20&%20", "%20%26%20") //Fix for passing ampersands through the URL | |
q = q.split('&'); | |
for(var i = 0; i < q.length; i++){ |
This file contains hidden or 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
<!-- Bootstrap 3.2 Responsive Utilities > Test Cases - http://getbootstrap.com/css/#responsive-utilities-tests --> | |
<!-- This can be added to a project as needed --> | |
<!-- Add the helper class "hidden" to the main div if you want to temporarily hide it --> | |
<div class="row responsive-utilities-test visible-on"> | |
<div style="position:fixed; bottom:10px; left:10px; z-index:9999; padding:10px; background:rgba(255, 0, 255, 0.70); font-weight:bold; letter-spacing:1px;"> | |
<span class="visible-xs-block">Extra small (xs) | Phones (<768px)</span> | |
<span class="visible-sm-block">Small (sm) | Tablets (≥768px)</span> | |
<span class="visible-md-block">Medium (md) | Desktops (≥992px)</span> | |
<span class="visible-lg-block">Large (lg) | Desktops (≥1200px)</span> |
This file contains hidden or 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
var sel = $("selector"); | |
var coords = sel[0].getBoundingClientRect(); | |
// Usage | |
console.log(coords.top); | |
console.log(coords.bottom); | |
console.log(coords.left); | |
console.log(coords.right); |
This file contains hidden or 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
// random number, inputting botht the min and max number | |
function randomNum(from, to){ | |
return Math.floor(Math.random() * (to - from + 1) + from); | |
} | |
// Usage: randomNum(1, 100) | |
// random number, inputting only the max number | |
function randomNum(max) { | |
return Math.floor(Math.random() * max) + 1; |
This file contains hidden or 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
var app.url = (location.href); //Cached for heavy general use | |
app.isOnPage = function(pageName) { | |
return app.url.split("?")[0].split("/").pop() == pageName; | |
} | |
//Usage | |
if (app.isOnPage("services")) { | |
alert("on services page"); | |
} |
NewerOlder