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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Loop each jQuery</title> | |
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> | |
</head> | |
<body> | |
<select multiple id="hari"> | |
<option value="Senin">Senin</option> |
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
<div class="rating"> | |
<input type="radio" name="rating" value="5" id="5"><label for="5">☆</label> | |
<input type="radio" name="rating" value="4" id="4"><label for="4">☆</label> | |
<input type="radio" name="rating" value="3" id="3"><label for="3">☆</label> | |
<input type="radio" name="rating" value="2" id="2"><label for="2">☆</label> | |
<input type="radio" name="rating" value="1" id="1"><label for="1">☆</label> | |
</div> |
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
<template> | |
<div class="child"> | |
<!-- Simplest - call `$emit()` inline--> | |
<button type="button" name="button" v-on:click="$emit('increment')">Click me to increment!</button> | |
<!-- set a variable then trigger a method which calls `$emit()` --> | |
<label for="child-input">Child input: </label> | |
<input id="child-input" type="text" name="msg" v-model="childMessage" v-on:keyup="emitToParent"> | |
</div> | |
</template> |
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(){ | |
/** add active class and stay opened when selected */ | |
let url = window.location; | |
// for sidebar menu entirely but not cover treeview | |
$('ul.sidebar-menu a').filter(function() { | |
return this.href === url.href; | |
}).parent().addClass('active'); | |
// for treeview | |
$('ul.treeview-menu a').filter(function() { |
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
<?php | |
if (! function_exists('contact_check')) | |
{ | |
function contact_check() | |
{ | |
$CI =& get_instance(); | |
$client = new Google_Client(); | |
$client->setApplicationName('Whatsapp'); | |
$client->setScopes([ | |
"https://www.google.com/m8/feeds", |
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
<?php | |
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on"){ | |
$config['base_url'] = "https://".$_SERVER['HTTP_HOST']; | |
}else{ | |
$httphost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ""; | |
if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == "https"){ | |
$config['base_url'] = "https://".$httphost; | |
}else{ | |
$config['base_url'] = "http://".$httphost; | |
} |
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
// ref : https://stackoverflow.com/questions/43584707/bootstrap-tab-throws-dataoption-is-not-a-function-error | |
jQuery(document).ready(function($) { | |
// Javascript to enable link to tab | |
var url = document.location.toString(); | |
if (url.match('#')) { | |
var name = url.split('#')[1] | |
$('.nav-tabs a[href="#' + name + '"]').tab('show'); | |
} | |
}); |
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 el = this.$refs[index][0]; // your element | |
if (el.classList.contains("btn-added")) { | |
el.classList.remove("btn-added") | |
el.innerHTML = "order" | |
}else{ | |
el.innerHTML = "batal" | |
el.classList.add("btn-added") | |
} |
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
<?php | |
if (! function_exists('contact_create')) | |
{ | |
function contact_create($params = false) | |
{ | |
if (isset($params["phone"])) { | |
$CI =& get_instance(); | |
$nama = $params["nama"]; | |
$phone = formatPhone($params["phone"]); |
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
<?php | |
/** | |
* check ke goole apakah sudah pernah login | |
* init path ke secret & auth penggunaan offline apps | |
*/ | |
public function ajx_checkAuth() | |
{ | |
$client = new Google_Client(); | |
$client->setApplicationName('MyAPP'); | |
$client->setScopes([ |