Topic: CSS

Bootstrap On-Off Toggle Switch jQuery Plugins 0

Bootstrap On-Off Toggle Switch jQuery Plugins

Today, We want to share with you Bootstrap On-Off Toggle Switch jQuery Plugins.In this post we will show you bootstrap toggle switch with text, hear for An ON/OFF switch using bootstrap and jQuery we will give you demo and example for implement.In this post, we will learn about jquery toggle switch programmatcally on off with an example.

Bootstrap On-Off Toggle Switch jQuery Plugins

There are the Following The simple About Bootstrap On-Off Toggle Switch jQuery Plugins Full Information With Example and source code.

As I will cover this Post with live Working example to develop jquery ui toggle switch, so the css toggle switch with text for this example is following below.

On-Off Toggle Switches Example

index.html

<!DOCTYPE html>
<html>
<head>
    <title>jQuery On-Off Toggle/Switch</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

</head>
<body style="margin:10%;">
<br/>
<hr/>
<h1>jQuery On-Off Toggle/Switch - Example - pakainfo.com</h1>
<div class="switch"> Enable/Disable :<label for="mycheckbox" class="switch-toggle" data-on="On" data-off="Off"></label> <input type="checkbox" id="mycheckbox" /> </div>


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<style>
  label.switch-toggle { background: url('https://blog.dbrgn.ch/images/2011/11/21/switch.png') repeat-y; display: block !important; height: 12px; padding-left: 26px; cursor: pointer; display: none; } label.switch-toggle.on { background-position: 0 12px; } label.switch-toggle.off { background-position: 0 0; } label.switch-toggle.hidden { display: none; }
</style>
<script>
$(document).ready(function() {
    $('.switch').each(function() {
        var live_switch = $(this).children('input[type=checkbox]');
        var switch_toggle_on_off = $(this).children('label.switch-toggle');
        if (live_switch.length) {
            live_switch.addClass('hidden');
            switch_toggle_on_off.removeClass('hidden');
            if (live_switch[0].checked) {
                switch_toggle_on_off.addClass('on');
                switch_toggle_on_off.removeClass('off');
                switch_toggle_on_off.text(switch_toggle_on_off.attr('data-on'));
            } else {
                switch_toggle_on_off.addClass('off');
                switch_toggle_on_off.removeClass('on');
                switch_toggle_on_off.text(switch_toggle_on_off.attr('data-off'));
            };
        }
    });
    $('.switch-toggle').click(function() {
        var live_switch = $(this).siblings('input[type=checkbox]')[0];
        var switch_toggle_on_off = $(this);  
        if (live_switch.checked) {
            switch_toggle_on_off.addClass('off');
            switch_toggle_on_off.removeClass('on');
            switch_toggle_on_off.text(switch_toggle_on_off.attr('data-off'));
        } else {
            switch_toggle_on_off.addClass('on');
            switch_toggle_on_off.removeClass('off');
            switch_toggle_on_off.text(switch_toggle_on_off.attr('data-on'));
        };
    });
});
</script>
</body>
</html>

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Bootstrap On-Off Toggle Switch jQuery Plugins.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Simple Materialize CSS Autocomplete Ajax using PHP 0

Simple Materialize CSS Autocomplete Ajax using PHP

Today, We want to share with you Simple Materialize CSS Autocomplete Ajax using PHP.In this post we will show you Materialize CSS Autocomplete with AJAX in PHP, hear for Materialize autocomplete with dynamic data in jquery ajax we will give you demo and example for implement.In this post, we will learn about Materialize CSS Framework Ajax Autocomplete Example using PHP with an example.

Simple Materialize CSS Autocomplete Ajax using PHP

There are the Following The simple About Simple Materialize CSS Autocomplete Ajax using PHP Full Information With Example and source code.

As I will cover this Post with live Working example to develop Materialize Autocomplete using PHP with Demos, so the autocomplete textbox using jquery ajax for this example is following below.

Materialize Autocomplete using PHP – Example

Include JS and CSS CDN libs.
autocomplete textbox using jquery ajax Example


$(document).ready(function() {
});



And Then make a simple HTML input field and name it product

<div class="row">
<div class="input-field col s6">

<label for="product">Search Product here</label>
</div>
</div>

Now add the easy Devbridge autocomplete source code for the HTML input field with materialize autocomplete multiple.

$("#product").devbridgeAutocomplete({
	serviceUrl:"getProduct.php",
	type:'POST',
	onSelect: function (myproducts) {
	// $('#selection').html('You selected: ' + myproducts.value + ', ' + myproducts.data);
	},
	showNoSuggestionNotice: true,
	noSuggestionNotice: 'Sorry, no matching results',
});

Now make a PHP source code to file and copy and paste the below simple materialize css select code.

HTML – Full HTML Source Code.



 <title>Pakainfo - Materialize CSS Ajax Autocomplete Using PHP and DevBridge</title>
  


  
.autocomplete-myproductss { border: 1px solid #999; background: #FFF; overflow: auto; }
.autocomplete-myproducts { padding: 2px 5px; white-space: nowrap; overflow: hidden; }
.autocomplete-selected { background: #F0F0F0; }
.autocomplete-myproductss strong { font-weight: normal; color: #3399FF; }
.autocomplete-group { padding: 2px 5px; }
.autocomplete-group strong { display: block; border-bottom: 1px solid #000; }
  



<div class="row">
	<div class="col s6 center">
		<h4>Pakainfo.com -  Materialize CSS Ajax Autocomplete Using PHP and DevBridge</h4>
	</div>
</div>
<div class="row">
	<div class="input-field col s6">
		
		<label for="product">Search Product here</label>
	</div>
</div>





        
        $(document).ready(function() {
                  $("#product").devbridgeAutocomplete({
                    serviceUrl:"getProduct.php", //tell the script where to send requests
                      type:'POST',
                      onSelect: function (myproducts) {
                         // $('#selection').html('You selected: ' + myproducts.value + ', ' + myproducts.data);
                        },
                    showNoSuggestionNotice: true,
                    noSuggestionNotice: 'Sorry, no Your matching products',
                  });
        });
      


Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Simple Materialize CSS Autocomplete Ajax using PHP.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Create Scroll Back to Top Button using jQuery and CSS 0

Create Scroll Back to Top Button using jQuery and CSS

Create Scroll Back to Top Button using jQuery and CSS

Welcome on Pakainfo.com – Examples ,The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Create Scroll Back to Top Button using jQuery and CSS

In this post we will show you Best way to implement Creating a smooth scroll “Back to Top” button using jQuery, hear for How to Create Floating Back to Top Button with jQuery with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

HTML markup Part(index.html)

<div id="content">Clcik here to Scroll ↓</div>
<a href="#" id="live-back-top" title="Back to top">↑</a>

JavaScript Part (index.js)

if ($('#live-back-top').length) {
    var scrollTrigger = 100, // px
        backToTop = function () {
            var scrollTop = $(window).scrollTop();
            if (scrollTop > scrollTrigger) {
                $('#live-back-top').addClass('show');
            } else {
                $('#live-back-top').removeClass('show');
            }
        };
    backToTop();
    $(window).on('scroll', function () {
        backToTop();
    });
    $('#live-back-top').on('click', function (e) {
        e.preventDefault();
        $('html,body').animate({
            scrollTop: 0
        }, 700);
    });
}

Style Part (style.css)

#live-back-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 9999;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 30px;
    background: #f5f5f5;
    color: #444;
    cursor: pointer;
    border: 0;
    border-radius: 2px;
    text-decoration: none;
    transition: opacity 0.2s ease-out;
    opacity: 0;
}
#live-back-top:hover {
    background: #e9ebec;
}
#live-back-top.show {
    opacity: 1;
}
#content {
    height: 2000px;
}

Example

I hope you have Got Customizable Back To Top Button with jQuery – backTop And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

How To Create Contact Form With PHPMailer To Send Mails 0

How To Create Contact Form With PHPMailer To Send Mails

How To Create Contact Form With PHPMailer To Send Mails

In this Post We Will Explain About is How To Create Contact Form With PHPMailer To Send Mails With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to How to send email from contact form using PHPExample

In this post we will show you Best way to implement Creating a Simple Contact Form with PHP, hear for Contact form with PHP Mailer – PHPwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Introduction

Every web-application or websites have Their Simple own contact page to get feedback and messages from visitor, As well as it will need site owners to improve Their Simple web-application or websites performance And Have idea about user experience. Here I am going to develop a simple contact form using HTML and send mails to Super Admins contacts with need of PHPMailer (A PHP Class).

And Then we need to Make a simple contact form with need of HTML forms and design it with some CSS work based on wer needs.You might save this file as contact.php

HTML Form

<?php 
if(isset($_GET['response']) && $_GET['response'] == 'success') {
      echo '<div class="success_msg"> Thank we for contacting us. We will get back to we soon. </div> ';
} ?>

     .success_msg {
          background-color: #fed;
          color: green;
          border: 1px solid green; 
     }

<form name="live-contact-form" method="post" action="live-contact-process.php">
<table width="450px">
</tr>
<tr>
<td valign="center">
<label for="fname">First Name *</label>
</td>
<td valign="center">

</td>
</tr>

<tr>
<td>
<label for="lname">Last Name *</label>
</td>
<td valign="center">

</td>
</tr>
<tr>
<td valign="center">
<label for="email">Email Address *</label>
</td>
<td valign="center">

</td>

</tr>
<tr>
<td valign="center">
<label for="mobile">Mobile Number</label>
</td>
<td valign="center">

</td>
</tr>
<tr>
<td valign="center">
<label for="subject">Subject</label>
</td>
<td valign="center">

</td>
</tr>
<tr>
<td valign="center">
<label for="message">Message *</label>
</td>
<td valign="center">
<textarea name="message" cols="25" rows="6"></textarea>
</td>

</tr>
<tr>
<td colspan="2" style="text-align:center">
<!-- We are  simple grateful to we for keeping this link in place. thank we. -->
 ( <a href="https://pakainfo.com">Get Help from live24ucodes tut.</a> )
</td>
</tr>
</table>
</form>

Than CSS style it with the need of CSS(Cascading Style Sheet).as well as When User simple click on Submit button, and then it will send the data’s to to `live-contact-process.php`.

PHP

Here we are going to simple handle the user step by step entered data’s and simple send it to Super Admin email address at the same time we send a simple acknowledge to the and smple particular user.

<?php
require_once("PHPMailerAutoload.php"); //here this will simple include smtp data and pop files.

if(isset($_POST['email'])) {

   $to_email = "[email protected]";

   function mydedc($error) {// wer error code can go here
        echo "We're sorry, here but there's errors data simples found with theas simple  well as form we submitted.<hr /><hr />";
        echo $error."<hr /><hr />";
        echo "here Please go back and simple fix these errors.<hr /><hr />";
        die();
   }

   //Devlopend by livu.com e validation expected data exists
   if(!isset($_POST['fname']) ||!isset($_POST['lname']) ||!isset($_POST['email']) ||!isset($_POST['mobile']) ||!isset($_POST['subject']) || !isset($_POST['message'])) {
       mydedc('We are sorry, but there simple appears to be a some problem with the form we submitted.'); 
   }

   $fname = $_POST['fname']; //Data required
   $lname = $_POST['lname']; //Data required
   $form_email = $_POST['email']; //Data required
   $mobile = $_POST['mobile']; //Data not required
   $subject = $_POST['subject']; //Data required
   $message = $_POST['message']; //Data required

   $msg_err = "";
   $email_exp = '/^[A-Za-z0-9._%-][email protected][A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
   if(!preg_match($email_exp,$form_email)) {
       $msg_err .= 'The Email Address we entered does not appear to be valid.<hr />';
   }
   $msg_string_exp = "/^[A-Za-z .'-]+$/";
   if(!preg_match($msg_string_exp,$fname)) {
      $msg_err .= 'The USER First Name we entered does not appear to be valid.<hr />';
   }
   if(!preg_match($msg_string_exp,$lname)) {
       $msg_err .= 'The USER Last Name we entered does not appear to be valid.<hr />';
   }
   if(!preg_match($msg_string_exp,$subject)) {
      $msg_err .= 'The Last Name we entered does not simple appear to be valid.<hr />';
   }
   if(strlen($message) < 2) {
       $msg_err .= 'The Live Message we entered do not simple appear to be valid.<hr />';
   }
   if(strlen($msg_err) > 0) {
       mydedc($msg_err);
   }
   $msgbody_email = "\n\n";

   $msgbody_email .= "First Name: ".clean_string($fname)."\n";
   $msgbody_email .= "Last Name: ".clean_string($lname)."\n";
   $msgbody_email .= "Email: ".clean_string($form_email)."\n";
   $msgbody_email .= "Mobile: ".clean_string($mobile)."\n";
   $msgbody_email .= "Subject: ".clean_string($subject)."\n";
   $msgbody_email .= "Message: ".clean_string($message)."\n";

   $mail = new PHPMailer();
   $mail->isSendmail();
   $mail->setFrom($form_email, $fname.$lname);
   $mail->addAddress($to_email, 'live24u Varadha);
   $mail->Subject = $subject;
   $mail->msgHTML(file_get_contents('path/to/file/attachment-file.extension'), dirname(__FILE__));

   if (!$mail->send()) { //send the message, check for errors
      echo "Mailer Error: " . mydedc($error);
   } else {
       header('Location: contact.php?response=success'); 
   }
?>

<!--Devlopend by livu.com place wer own success html simple below -->


PHPMailer Class :

It have some extended latest features, just take simple look at here to use it effective way With Like as a CC, BCC as well as Reply-To . This is simple how we can some design a contact form with using PHP phpmailer to send emails. If We have any some queries and some doubts drop wer Message here.

Example

I hope you have Got What is php – how to send on contact form using phpmailer And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

CSS Sticky Footer Tutorial Example From Scratch 0

CSS Sticky Footer Tutorial Example From Scratch

Today, We want to share with you CSS Sticky Footer Tutorial Example From Scratch.In this post we will show you fixed footer overlaps content, hear for make div stick to bottom of parent we will give you demo and example for implement.In this post, we will learn about keep footer at bottom of page when scrolling with an example.

CSS Sticky Footer Tutorial Example From Scratch

There are the Following The simple About CSS Sticky Footer Tutorial Example From Scratch Full Information With Example and source code.

As I will cover this Post with live Working example to develop responsive sticky footer, so the css tricks sticky for this example is following below.

Creating a Sticky Footer

Step 1: HTML Part

<body>
  <main><main>
  <footer></footer>
</body>

Step 1: Pure CSS Part

main {
  min-height: calc(100vh - 50px);
}
footer {
  height: 50px;
}

Step 3: JavaScript Part

function set_main_height(){
   var footerHeight = $('footer').innerHeight();
   $('main').css('min-height','100vh -'+footerHeight);
}
 
$(function() { 
  set_main_height();
  window.resize(function(){
    set_main_height();
  });
});

Simple Sticky Footer Examples

Example 1: Sticky Footer with Negative Margin

HTML Part

<div class="content">
  <h1>Sticky Footer with Negative Margin 1</h1>
  <p><button id="add">Include Data</button></p>
  <div class="push"></div>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
html, body {
  height: 100%;
  margin: 0;
}
.content {
  padding: 20px;
  min-height: 100%;
  margin: 0 auto -50px;
}
.footer,
.push {
  height: 50px;
}


js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").insertBefore(".push");
});

Example 2: Sticky Footer Navbar Template for Bootstrap

HTML Part

<div class="content">
  <div class="content-inside">
    <h1>Sticky Footer Navbar Template for Bootstrap</h1>
    <p><button id="add">Include Data</button></p>
  </div>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
html, body {
  height: 100%;
  margin: 0;
}
.content {
  min-height: 100%;
}
.content-inside {
  padding: 20px;
  padding-bottom: 50px;
}
.footer {
  height: 50px;
  margin-top: -50px;
}

js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content-inside");
});

Example 3: Sticky Footer Template for Bootstrap

HTML Part

<div class="content">
  <h1>Sticky Footer with calc()</h1>
  <p><button id="add">Include Data</button></p>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
.content {
  min-height: calc(100vh - 70px);
  padding: 40px 40px 0 40px;
}
.footer {
  height: 50px;
}

js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content");
});

Example 4: Adding a Sticky Footer Using CSS

HTML Part

<div class="content">
  <h1>Adding a Sticky Footer Using CSS</h1>
  <p><button id="add">Include Data</button></p>
</div>

<footer class="footer">
  Footer 
</footer>

CSS Part
html {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.content {
  flex: 1 0 auto;
  padding: 20px;
}
.footer {
  flex-shrink: 0;
  padding: 20px;
}


js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content");
});

Example 5: Pure CSS3 Sticky Footer

HTML Part

<div class="content">
  <h1>Pure CSS3 Sticky Footer with Grid</h1>
  <p><button id="add">Include Data</button></p>
</div>

<footer class="footer">
  Footer
</footer>

CSS Part
html {
  height: 100%;
}
body {
  min-height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
}
.content {
  padding: 20px;
}
.footer {
  grid-row-start: 2;
  grid-row-end: 3;
}


* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 16px Sans-Serif;
}
h1 {
  margin: 0 0 20px 0;
}
p {
  margin: 0 0 20px 0;
}
.footer {
  background: #42A5F5;
  color: white;
  padding: 20px;
}

js Part
$("#add").on("click", function() {
  $("<p>Welcome to PakaInfo – a blog where you will learn about General Information, Jobs, Earn Money, Education, Health, Technology, Life Style, Science, Top10, Nature.
In other words, it is a community of software engineers and developers.</p>").appendTo(".content");
});

Angular 6 CRUD Operations Application Tutorials

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about CSS Sticky Footer Tutorial Example From Scratch.
I would like to have feedback on my Pakainfo.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.