Skip to content

Instantly share code, notes, and snippets.

{
type: 'combo',
ref: 'filterByStatus',
cls: 'filter-by-status',
flex: '0 0 12.5em',
placeholder: 'Find tasks by status',
clearable: true,
keyStrokeChangeDelay: 100,
triggers: {
filter: {
@locii
locii / gist:3a2646b8abea9570438c03d49f1f97f7
Created June 7, 2016 12:00
Loops through <address> tags on a page and renders a map with markers to the #map div
function initialise() {
var myLatlng = new google.maps.LatLng(5.376964, 100.399383); // Add the coordinates
var mapOptions = {
zoom: 5, // The initial zoom level when your map loads (0-20)
zoomControl:true, // Set to true if using zoomControlOptions below, or false to remove all zoom controls.
zoomControlOptions: {
style:google.maps.ZoomControlStyle.DEFAULT // Change to SMALL to force just the + and - buttons.
},
center: new google.maps.LatLng(48.2082, 16.3738),
mapTypeId: google.maps.MapTypeId.ROADMAP, // Set the type of Map
<h3 style="text-align: center;">A colourful and flexible Joomla template built on a fast framework.</h3>
<p style="text-align: center;">Corporation is a bright and beautiful Joomla 3+ template that is fast and lightweight out of the box. It features an awesome array of features that come standard with any of our Zen Grid Framework based themes.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="images/democontent/corporation-responsive.png" alt="Corporation Template" /></p>
<p>{zen-row} {zen-4}</p>
<p>{zen-rocket}{/zen-rocket}</p>
<h3>Super Speedy</h3>
<p><strong>Corporation achieves very high page speed and YSlow scores almost out of the box</strong></p>
<p>We built our template framework around the idea that any modern website needs to load quickly, and so with a few tweaks to the template settings and your htaccess file it's possible to achieve page speed scores in the high 80's or 90's for your website.</p>
<p>{/zen-4} {zen-4}</p>
<p>{zen-users}{/zen-users}</p>
<p><img class="profile" src="<a href=" alt=" />http://farm4.staticflickr.com/3267/3258492421_3e81372ec4_q.jpg" alt="Profile" /></p>
<h1>Charlie Parker</h1>
<p>Lover - Fighter - Photographer.</p>
@locii
locii / gist:a6086a1f99d00a697a84
Created July 24, 2015 04:24
Remove .parent class from Joomla menu items that arent actually parents with jQuery
// This is obviously an incomplete solution because
// any carets will load on the page and will then get removed afterwards
// once the dom is ready.
$('.parent').each(function() {
if($(this).find('ul').length == 0) {
$(this).removeClass('parent');
}
});
@locii
locii / gist:38689e5ccda2bc1747d9
Last active August 29, 2015 14:25
Adding text for the menmenu open link
jQuery(document).ready(function ($) {
$('#navwrap nav').meanmenu({
<?php if($this->params->onepage) { ?>
onePage: true,
<?php } ?>
meanMenuOpen: "<span class='menu-bar'><span /><span /><span /></span><span class='menu-text'>Menu</span>",
meanScreenWidth: '<?php echo str_replace('px','',$this->params->navcollapse);?>'
});
});
@locii
locii / gist:b000a6240efbceed85d3
Created August 31, 2014 22:08
Test if dropdown menu is off the screen
$(".dropdown li").on('mouseenter mouseleave', function (e) {
var elm = $('ul:first', this);
var off = elm .offset();
var l = off.left;
var w = elm.width();
var docW = $(".container").width();
var isEntirelyVisible = (l+ w <= docW);
if ( ! isEntirelyVisible ) {
@locii
locii / 0_reuse_code.js
Created March 4, 2014 00:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@locii
locii / gist:9220224
Created February 25, 2014 23:27
Joomla constant to administrator
JPATH_ADMINISTRATOR