This file contains 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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains 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
labels = document.getElementsByTagName('label'); | |
len = labels.length; | |
for(var i = 0; i < len; i++) { | |
if(labels[i].htmlFor == elementId) { | |
errLabel= labels[i].innerHTML; | |
} | |
} |
This file contains 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
<li><a href="/campaignManagerWeb/mb/createsmspushoffer">Create .....</a></li> | |
<!-- add the above to the ul and no div container for it --> | |
<!-- issues: 1.cmsleftmenu.jsp taken out 2.pagination calls must be turned to ajax calls in order to keep content within tab otherwise goes to page --> |
This file contains 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
> sudo npm cache clean -f | |
> sudo npm install -g n | |
> sudo n stable <or specific version> |
This file contains 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
git init | |
git add . | |
git status | |
git commit -m"inital checkin" | |
git remote add origin https://github.com/<UID>/<REPO_NAME> | |
git pull origin master |
This file contains 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
git add . | |
git status | |
commit -m"blah blurb boop" | |
git push origin master |
This file contains 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
function ObserveMe() { | |
var x = | |
{ | |
"thing": | |
{ "label": "party", | |
"value": "republican" | |
} | |
} | |
return x; | |
} |
This file contains 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 ng-app='q.apApp'> |
This file contains 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
<form name="gonebatty" ng-app="q.apApp" ng-controller='AppController' method="post" novalidate> | |
<label>Header Font Color:</label> | |
<input type="text" id="font-color" ng-model="homePageHeaderFontColor" | |
hexadecimal-color-validation={{homePageHeaderFontColor}}> | |
<span ng-show="gonebatty.homePageHeaderFontColor.$error.validHexColor" class="errorMessage" ng-cloak> | |
Invalid color code | |
</span> | |
This file contains 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
angular.module('angularstruts').directive('hexadecimalColorValidation', [function(){ | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
scope: { | |
}, | |
link: function(scope, elem, attrs, ctrl) { | |
elem.on('blur', function(event) { | |
scope.$apply(function() { | |
var val, hexCodeRegex, validationResult=true; |
OlderNewer