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
SELECT `Name`, `Rating`, `City`, `Country`, `Displayed`, REPLACE(REPLACE(REPLACE(`Rating`,'Gold','1'),'Silver','2'),'Bronze','3') as `ratingNum` FROM `table` WHERE `Displayed` = 'Yes' ORDER BY `ratingNum`,`Name` ASC |
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
# IMPORTANT! Use Ruby 1.9.1 | |
# command that works for creating a new phonegap-android project | |
ruby bin/droidgap classic "C:/android-sdk/android-sdk-windows" TestGap TestGap.com "C:/www" "C:/phonegap/projects/TestGap" | |
# Open Eclipse and File -> New -> Project. Then choose Android -> Android Project. Give your project a name, click the radio button for "Create project from existing source", and browse to your generated project folder. | |
# Don't forget to add the phonegap.jar to your project. Expand the libs folder and then right-click on phonegap.jar and choose "BuildPath -> Add to Build Path" |
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
$(document).ready(function() { | |
$('.datePicker').each(function(){ | |
var $this = $(this); // cache the this object | |
$this.keydown( function(event){ | |
if ( event.keyCode !== 9 ){ // If key is not Tab - for accessibility | |
event.preventDefault(); // Prevents user input, forces user to use Calendar Date Picker widget | |
} | |
}) | |
.datepicker({ | |
showOn : 'both', // displays Calendar widget on focus of input and on clicking the Calendar icon |
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
<xsl:for-each select="main_menu/menu_item[position() <= 4]"> | |
<!-- using xsl:element here so I can add classes easily --> | |
<xsl:element name="li"> | |
<xsl:choose> | |
<xsl:when test="page_name = 'index2'"> | |
<xsl:attribute name="class">active</xsl:attribute> | |
</xsl:when> | |
<xsl:when test="position() = last()"> | |
<xsl:attribute name="class">noMargin</xsl:attribute> | |
</xsl:when> |
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
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> | |
<script id="adminBarTemplate" type="text/x-jquery-tmpl"> | |
<li><img src="${iconSrc}" alt="${area}" /><a target="_blank" href="${areaLink}">${area}<span></span></a></li> | |
</script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
var adminBarData = [ | |
{ "iconSrc" : "src", "area" : "Page Text Manager", "areaLink" : "/admin/flex/bin/main.html" }, | |
{ "iconSrc" : "src", "area" : "Menu Manager", "areaLink" : "/admin/flex/bin/menuManager.html" } | |
]; |
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
javascript:open(location,'iPhone:portrait','innerWidth='+(320+15)+',innerHeight='+(480+15)+',scrollbars=yes'); |
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
$("html,body").animate({ scrollTop : $(".tabs").offset().top - 5 }, 500); // smoothly animate scrollbar back up to the tabs |
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 signUp = function () { | |
var signupData = $( '#competition_form' ).serializeArray(), | |
params = {}; | |
// setup params data from signupData | |
signupData.map( function( value ) { | |
params[value.name] = value.value; | |
} ); | |
// set required data | |
$.extend( params, { |
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
$(slider).parent().find('.rating').removeClass(function(index, elementClass) { | |
matches = elementClass.match(/rating-[0-9]+/); | |
if( $(matches).length ) { | |
return matches.join(' '); | |
} | |
}); |