Posts

Showing posts with the label JavaScript

Image Gallery Codepen

HTML Code width JQuery Script <!--<div class="wrapper">   <div class="images">     <img src="https://source.unsplash.com/1600x900/?rainforest" />     <img src="https://source.unsplash.com/1600x900/?trees" />     <img src="https://source.unsplash.com/1600x900/?rocks" />     <img src="https://source.unsplash.com/1600x900/?mountains" />     <img src="https://source.unsplash.com/1600x900/?water" />     <img src="https://source.unsplash.com/1600x900/?nature" />   </div>   <div class="text">     <p>Click the images.</p>   </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript">   $(".images img").click(function () {   $(this).addClass("zoom"); }); $(".images img").mouseleave...

Display Search on Button Click with Animation

  HTML  <button id="search_button" onclick="search_display()"><i class="fas fa-search"></i></button>        <div id="search"><input type="text" name="search_bar" id="search_bar" placeholder="Search.."><button id="search_button1"><i class="fas fa-search"></i></button></div> CSS #search_button,#search_button1 {   float: right;   width: 4vw;   height: 8vh;   border: none;   background: #fedd02;  }  #search_button:hover,#search_button1:hover {   color: white;  } #search {   display: none;   position: fixed;   top: 6.5vh;   right: 11.8vw;  }  #search_bar {   width: 20vw;   height: 8vh;   background: #000000;   color: #FFFFFF;   animation: 1s fade ease;  }  @keyframes fade {   from {     width: 0;   }   to{     width: 20vw;   } }  #se...

Event Calendar

Event Calendar HTML, CSS and JS

Testimonial Slider

HTML    <!--   #### EDIT   I built this slider when I first started to learn JS, you can rebuild it with more readable, simple and less code, I'm too lazy to update it, sorry :)   -->   <!--     -->  <!-- <section id="testim" class="testim">           <div class="testim-cover">                <div class="wrap">                   <span id="right-arrow" class="arrow right fa fa-chevron-right"></span>                   <span id="left-arrow" class="arrow left fa fa-chevron-left "></span>                   <ul id="testim-dots" class="dots">                       <li class="dot active"></li>         ...

Text Editor

Text Editor                <div class="form-group">                    <label for="title" class="col-sm-3 control-label">Event Details</label>                    <div class="col-sm-9">                        <textarea id="details" name="details" class="summernote">{{isset($event->details)?$event->details:null}}</textarea>                    </div>                </div> <script type="text/javascript">     $('.summernote').summernote({       airMode: true       }); </script> The Data from this Text Editor- SAVED WITH TAGS - into Database Table To display data on page without tags - strip_tags() Funct...

Image Preview Scripts & Add Multiple Boxes Scripts

How to load Single Image Preview <input type="file" name="" id="" onchange="readURL(this, previewImage)"> <img id="previewImage" value="">  <script type="text/javascript">         function readURL(This, img_id) {         var reader = new FileReader();         reader.onload = function(e) {         $('img#'+img_id).attr('src', e.target.result);         $('img#'+img_id).addClass('on__changeImg');         $('img#'+img_id).css('border','1px solid #000');         }         reader.readAsDataURL(This.files[0]);         }   </script> How to load Single Image Preview <script> function readURL(input) {     if (input.files && input.files[0]) {         var reader = new FileReader();         reader.onload = function (e) { ...