Posts

Showing posts with the label JS

Simple "Load More"

Simple "Load More"   https://codepen.io/Tigran_91/pen/JyaZPz <div class="container">   <div class="flex">     <div class="content">Box 1</div>     <div class="content">Box 2</div>     <div class="content">Box 3</div>     <div class="content">Box 4</div>     <div class="content">Box 5</div>     <div class="content">Box 6</div>     <div class="content">Box 7</div>     <div class="content">Box 8</div>     <div class="content">Box 9</div>     <div class="content">Box 10</div>     <div class="content">Box 11</div>     <div class="content">Box 12</div>     <div class="content">Box 13</div>     <div class="content">Box 14</div>     <div class=...

Custom Carousel using Function.php Custom post type using shortcode [custom-post-type] example.

 /* STUDY ABROAD */ function studyabroads_register() {  $labels = array(   'name' => _x('Studyabroad', 'post type general name'),   'singular_name' => _x('studyabroads', 'post type singular name'),   'add_new' => _x('Add New', 'review'),   'add_new_item' => __('Add New Studyabroads'),   'edit_item' => __('Edit Studyabroads'),   'new_item' => __('New Studyabroads'),   'view_item' => __('View Studyabroads'),   'search_items' => __('Search Studyabroads'),   'not_found' =>  __('Nothing found'),   'not_found_in_trash' => __('Nothing found in Trash'),   'parent_item_colon' => ''  );  $args = array(   'labels' => $labels,   'public' => true,   'publicly_queryable' => true,   'show_ui' => true,   'query_var'...

Using this function add custom validation for woo-commerce check out form

  <script type =" text/javascript "> function validateForm(){ var b=document.forms["checkout"]["conditional_field_9-1"].value; var c=document.forms["checkout"]["conditional_field_11-1"].value; var d=document.forms["checkout"]["conditional_field_10-1"].value; var f=document.forms["checkout"]["conditional_field_5-1"].value; var g=document.forms["checkout"]["conditional_field_6-1"].value; var h=document.forms["checkout"]["conditional_field_1-1"].value; if (b==null || b=="",c==null || c=="",d==null || d=="",f==null || f=="",g==null || g=="",h==null || h=="") { alert("Please Fill All Required Field"); return false; } else { jQuery('body').addClass("sec-page"); } } </script>

BACK TO TOP SHORTCODE

  major faults wordpress developer uslu forget <!-- Go Top Back --> <script type="text/javascript"> // create the back to top button $('body').prepend('<a href="#" class="back-to-top">Back to Top</a>'); var amountScrolled = 300; $(window).scroll(function() { if ( $(window).scrollTop() > amountScrolled ) { $('a.back-to-top').fadeIn('slow'); } else { $('a.back-to-top').fadeOut('slow'); } }); $('a.back-to-top, a.simple-back-to-top').click(function() { $('html, body').animate({ scrollTop: 0 }, 700); return false; }); </script> a.back-to-top { display: none; width: 60px; height: 60px; text-indent: -9999px; position: fixed; z-index: 999; right: 20px; bottom: 20px; background: #27AE61 url("../images/up-arrow.png") no-repeat center 43%; -webkit-border-radius: 30px; -moz-border-radius: 30px; border-radius: 30px; } a:hover.back-to-t...

DATE PICKER FOR ANY CODE WORDPRESS PHP ETC

  <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.8.2.js"></script>    <script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>    <script>    $(function(){        $( ".datepicker" ).datepicker();        $("#icon").click(function() {            $(".datepicker").datepicker( "show" );        })    });    </script> <input type="text" required name="issue_date" size='9' class="datepicker" value="<?php echo $value['issue_date']; ?>"/> <td><input type="text" required name="valid_up" size='9' class="datepicker" value="<?php echo $value['valid_up']; ?>"/></td>