Skip to main content

Posts

Showing posts from March, 2021

How to keep the current tab active on page reload?

 keep the current tab active on page reload <script> jQuery(window).load(function() {     // this will get the full URL at the address bar     var url = window.location.href;      // passes on every "a" tag      jQuery(".menuuuu a").each(function() {             // checks if its the same on the address bar         if(url == (this.href)) {              jQuery(this).closest("li").addClass("active");         }     });     }); </script> In html <div class="menuuuu"> <ul class="nav-list1"> <li  class=""><a href="<?php echo site_url().'/dashboard/'; ?>"><i class="side-menu__icon fas fa-tachometer-alt"></i> Dashboard</a> </li> <li><a href="<?php echo site_url().'/profile/'; ?>"><i class="side-menu__icon fas fa-user"></i> My Profile</a></li> 

How to create forget password with otp in wordpress without plugin?

Create forget password with otp in wordpress without plugin .  Main-Page <?php  /* Template Name: forget-password  */  ob_start(); get_header(); ?> <div id="primary" class="content-area">                 <main id="main" class="site-main" role="main">                                 <?php                                 // Start the loop.                                 while ( have_posts() ) : the_post();                                                 // Include the page content template.                                                 get_template_part( 'template-parts/content', 'page' );                                                 // If comments are open or we have at least one comment, load up the comment template.                                                 if ( comments_open() || get_comments_number() ) {                                                                 comments_template(

How to upload file in database with ajax in codeigniter?

Upload file in the database with ajax in Codeigniter? Paste in View <form id="doc_table" name="doc_table" method="post" enctype="multipart/form-data"   > <?php //echo validation_errors(); ?>  <?php //echo form_open_multipart('upload/do_upload'); ?>       <div class="modal-body">            <div class="form-group"> <label for="formGroupExampleInput">Document Name</label> <input type="text" class="form-control doc_name" id="formGroupExampleInput" name="doc_name"  placeholder="Example input"> <label for="exampleFormControlTextarea1">Comment</label> <textarea class="form-control doc_comment" id="exampleFormControlTextarea1" name="doc_comment"  rows="3"></textarea> <label for="exampleFormControlFile1">Upl