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
<div> | |
<div style="margin-bottom: 2px;"> | |
<b><small>klik ☛ </small></b><input onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = ''; this.value = 'Hide'; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value = 'Show'; }" style="font-size: 10px; margin: 0px; padding: 0px; width: 60px;" type="button" value="Show" /> | |
</div> | |
<div style="border: 1px inset; margin: 0px; padding: 0px;"> | |
<div style="display: none;"> | |
TEKS | |
</div> |
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
<div id='foto_villa' class='carousel slide' data-ride='carousel'> | |
<div class='carousel-inner'> | |
<?php $i=0; foreach ($foto as $row): ?> | |
<?php if ($i==0) {$set_ = 'active'; } else {$set_ = ''; } ?> | |
<div class='carousel-item <?php echo $set_; ?>'> | |
<img src='<?php echo $row->file; ?>' class='d-block w-100'> | |
</div> | |
<?php $i++; endforeach ?> | |
</div> |
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
Call With : | |
<?php $this->load->view('loading'); ?> | |
File location : | |
loading.php on views folder | |
Custom Call function : | |
$(".preloader").fadeIn(); | |
Stop function : |
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
let checkInput = new Promise(function(solved, reject){ | |
let istirahat = {} | |
try { | |
document.querySelectorAll('input').forEach(function(el, index){ | |
if (!el.checkValidity()) { | |
alert(el.validationMessage) | |
el.focus() | |
throw istirahat | |
} else { | |
solved() |
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 deskripsi(id) { | |
if ( $('#deskripsi_'+id).is(':visible') ) { | |
$('#deskripsi_'+id).hide() | |
} else { | |
$('.deskripsi').hide() | |
$('#deskripsi_'+id).show() | |
} | |
} |
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
/* | |
waktu.add(*{format tanggal}, *{jenis}, *{jumlah penambahan}, {custom date / null}) | |
waktu.add('DD, dd FF YY', 'dd', 1) | waktu.add('DD, dd FF YY', 'dd', 1, '2020-09-25 13:30:00') | |
waktu.set('dd-MM-YY') | waktu.set('dd/MM/YY H:i:s', '2020-09-25') | |
*/ | |
var waktu = { | |
add : (format, jenis, plus, value = null) => { | |
let d = (value != null) ? new Date(value) : new Date(); | |
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
$(document).ready(function() { | |
$.fn.setDt = function(){ | |
this.dataTable({ | |
"paging" : true, | |
"ordering" : false, | |
"info" : true, | |
"searching" : true | |
}) | |
} | |
}); |
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
let clickAct = [] | |
const _do = { | |
disable: () => { | |
let el = $('[onclick]'), count = el.length | |
el.each((i, e) => { | |
$(e).addClass(`click_${i}`) | |
clickAct[i] = $(e).attr('onclick') | |
if(!--count) { el.removeAttr("onclick") } | |
}) | |
}, |
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
$.ajax({ | |
url: "https://file-examples-com.github.io/uploads/2017/02/zip_10MB.zip", | |
cache: false, | |
xhr: function(){ | |
var xhr = new XMLHttpRequest(); | |
xhr.responseType= 'blob'; | |
xhr.onprogress = e => console.log(`${parseInt((e.loaded/e.total)*100)}%`) | |
return xhr; | |
}, | |
success: e => console.log('done') |
OlderNewer