Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function() {
//Clock
var clock;
clock = $('.clock').FlipClock({
clockFace: 'TwelveHourClock',
showSeconds: false
});
//Set Punch In
$(document).on('click', '#punch_in', function(){
<script>
$(document).ready(function(){
//cycle
$(document).find(".na td").each(function () {
//the element length which == 0
var len = $(this).html().trim().length;
if(len == 0) {
//do something
$(this).text("N/A");
$(this).css("background","red");
->execute()->getResource()->fetchAll();
$res = $this->dbAdapter->query("SELECT location FROM users WHERE user_id=:user_id")->execute([
':user_id'=>$user_id,
])->getResource()->fetchAll();
if(!empty($res)){
$loc = $res[0]['location'];
}
if(!empty($loc)){
if($loc == 'Toronto'){
$x = array(18900, 36000);
//count time
//gist work with time
$res = $this->dbAdapter->query("SELECT location FROM users WHERE user_id=:user_id")->execute([
':user_id'=>$user_id,
])->getResource()->fetchAll();
if(!empty($res)){
$loc = $res[0]['location'];
}
if(!empty($loc)){
if($loc == 'Toronto'){
$x = array('18900','36000');
$("body").on("click", ".edit-job", function(){
//validation for all fields
var valid = true;
$('#form-with-customs input').each( function(){
if($.trim($(this).val()) == ''){
valid = false;
}
});
function heightDetect() {
$(".main_head").css("height", $(window).height());
};
heightDetect();
$(window).resize(function(){
heightDetect();
});