PHP Classes

File: public/asset/js/pages/profile.js

Recommend this page to a friend!
  Classes of fathurrahman   mnTemplate   public/asset/js/pages/profile.js   Download  
File: public/asset/js/pages/profile.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: mnTemplate
Route HTTP requests to callback functions
Author: By
Last change:
Date: 1 year ago
Size: 1,574 bytes
 

Contents

Class file image Download
$(document).ready(function () { setTimeout(function () { $('#pass').val('') }, 1000); var data = persiapan(); add_eventlistener(data); inisialisasi(data); }); function persiapan(){ var data = {}; data.readURL = function(input, prevEl) { console.log(input); if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $(prevEl).attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } return data; } function add_eventlistener(data) { $('#pp').hover(function () { $('#file').show(); }, function () { $('#file').hide(); }); $("#n-pp").change(function () { data.readURL(this, '#pp-preview'); }) }; function inisialisasi(data) { var options = { submitError: function (response) { endLoading(); var responseText = JSON.parse(response.responseText) $('#alert_danger strong').html(responseText.message).parent().show(); $('#btn-login').prop('disabled', false); }, sebelumSubmit: function (input,) { showLoading(); $('#alert_danger strong').html('').parent().hide(); $('#btn-login').prop('disabled', true); }, submitSuccess: function (res) { endLoading(); location.reload(); } } $("#bqn-form-edit-user").initFormAjax(options); $('#kelamin').trigger('change'); }