What is jLogin?
jLogin creates ajax login form instantly in a single line of code and few settings .It was built using the jQuery library.
How to use
Code below will automatically creates ajax login form.We can also define our own settings.
$(“.mydiv”).jlogin({post:"login.php", usernameLabel:"Email", username:"email"});
Demonstration
View the jLogin demo on new window or with a new-theme
Applying Theme
We can easily customize the jLogin appearance by adding css or by editing the jlogin.css itself. Let's try an example using new-theme.css i.e <link rel="stylesheet" type="text/css" href="new-theme.css" />
<link rel="stylesheet" type="text/css" href="jlogin.css" />
<link rel="stylesheet" type="text/css" href="new-theme.css" />
Basic Example with login.php
$(document).ready(function() {
$(“.mydiv”).jlogin({post:"login.php", onSuccess:"success.htm"});
});
<?php
if($_POST["email"] == "jlogin@devstring.com" && $_POST["password"] == "jlogin") {
echo "valid";
} else {
echo "invalid";
}
?>
API
| Option | Default value | Description |
|---|---|---|
| post | login.php | server side that returns text "valid" or "invalid". |
| onSuccess | success.htm | redirected once valid and successful login |
| invalidMessage | Invalid email or password. | invalid login message |
| usernameLabel | username label | |
| passwordLabel | Password | password label |
| rememberLabel | Remember Me | remember me checkbox label |
| username | name property of the username textbox | |
| password | password | name property of the password textbox |
| remember | remember | name property of the remember login checkbox |
| checked | false (true or false) | remember me checkbox property is checked or unchecked |
| title | Login | login form title |
| description | Your company has more to offer when you sign in to your account. |
login form description |
Download
You can download jlogin here
Support
For bug, enhancement and new features please post to the GitHub tracker or GitHub repository
License
jLogin is released under the terms of the MIT and GPL 2.0. You can use it free of charge, change it or build upon it however you like.