Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function(){
- var methods = {
- forms : function(){
- var login = function(){
- //$('input[type="submit"]').trigger('click');
- var user = $(this).children('form').children('input[type="text"]').val();
- var pass = $(this).children('form').children('input[type="password"]').val();
- if(user.length < 1 || pass.length < 1){
- alert('Invalid!\nPlease fill all required forms');
- } else {
- alert('username: '+user+'\npassword: '+pass);
- $.registar('hide');
- }
- }
- $.registar('show', {
- icon : '',
- width : '320px',
- content : '<h4>Registar</h4>'
- + '<form action="" method="GET">'
- + '<input placeholder="username" name="user" type="text"/'+'>'
- + '<input placeholder="password" name="pass" type="password"/'+'>'
- + '<input type="submit" style="display:none" / >'
- + '</form>',
- buttons : {
- button1 : {text: 'Registar', onclick: login},
- button4 : {text: 'Cancelar'}
- }
- });
- }
Add Comment
Please, Sign In to add comment