Skip to content

Instantly share code, notes, and snippets.

View daksamedia's full-sized avatar
💭
available for freelance job

Daksa Media.Inc daksamedia

💭
available for freelance job
View GitHub Profile
@daksamedia
daksamedia / cordova-plugin-camera-index.html
Created June 10, 2018 03:58 — forked from AysadKozanoglu/cordova-plugin-camera-index.html
Cordova Camera Plugin cordova-plugin-camera upload jquery ajax to server request
<!DOCTYPE html>
<!-- Aysad Kozanoglu -->
<html>
<head>
<title>foto cek</title>
<style>
html {
-webkit-user-select: none;
}
</style>
@daksamedia
daksamedia / getURLParam.js
Last active June 13, 2018 17:48
READ PARAMETER (JQUERY)
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
@daksamedia
daksamedia / otp_input.js
Created October 22, 2018 03:22
otp_like
var obj = document.getElementById('partitioned');
obj.addEventListener("keydown", stopCarret);
obj.addEventListener("keyup", stopCarret);
function stopCarret() {
if (obj.value.length > 3){
setCaretPosition(obj, 3);
}
}
var obj = document.getElementById('partitioned');
obj.addEventListener("keydown", stopCarret);
obj.addEventListener("keyup", stopCarret);
function stopCarret() {
if (obj.value.length > 3){
setCaretPosition(obj, 3);
}
}
@daksamedia
daksamedia / kp.js
Created March 27, 2019 10:42
bljapikp_1
function getItemKp(itemdIds, callback, loadMoreOptions){
if(itemdIds.length > 0){
$.ajax({
type : "POST", url : baseUrl + "/kp/itemCache", data : "itemIds="+itemdIds , timeout: 5000, success : function(data) {
/** list Property
*
* data.id item Id
* data.title item name
@daksamedia
daksamedia / kp_new.js
Created March 27, 2019 10:45
bljkpjs_new
function getdata(index,itemArr,cat,type){
$.ajax({
url:url,
method:'POST',
data : "itemIds="+itemArr,
success:function(res){
var food1 = eval(res);
if(type=="NORMAL" || type==undefined){
for(var i=0;i < food1.length;i++){
@daksamedia
daksamedia / CORDOVA - MAC EMULATE
Last active August 9, 2019 02:22
Cordova Instruction to Emulate
CORDOVA - MAC EMULATE
Android
- Install JDK
- Install Android Studio & SDK
- Install emulator
- Install Brew cli
- Install Gradle from Brew
window.onscroll = function(ev) {
if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
alert("you're at the bottom of the page");
}
};
@daksamedia
daksamedia / convert-seconds.js
Created December 31, 2020 08:27 — forked from martinbean/convert-seconds.js
Convert seconds to HH:MM:SS format in JavaScript.
new Date(seconds * 1000).toISOString().substr(11, 8)