This post will give you example of jquery ui nested tabs example . Here you will learn jquery ui sub tabs example. This tutorial will give you simple example of example of jquery ui tabs with subtabs. This tutorial will give you simple example of jquery ui tabs with subtabs.
In this blog, I will explain how to create nested tabs in jquery ui.we will show example of jquery ui nested tabs.I will jquery ui using create nested tabs.tabs view In other tab view create using jquery ui.We will make sub tabs using jquery and jqueryUi.I will show easy example of jquery ui sub tabs.
Here the example of jquery ui nested tabs.
Example
Now this nested tabs html design code:
<!DOCTYPE html>
<html>
<head>
<title>Jquery UI Nested Tabs Example</title>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<script data-require="jquery@2.1.1" data-semver="2.1.1" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script data-require="jquery-ui@1.10.4" data-semver="1.10.4" src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<style type="text/css">
.fix {
background: green;
background: rgba(0,255,0,0.3);
}
.broken {
background: red;
background: rgba(255,0,0,0.3);
}
</style>
<body>
<p>
Tabs below is working how we expect it. It opens tab2 and subtab2 on a pageload.
</p>
<div class="tabs fix">
<ul>
<li>
<a href="#tabs-1">Tab 1</a>
</li>
<li>
<a href="#tabs-2">Tab 2</a>
</li>
<li>
<a href="#tabs-3">Tab 3</a>
</li>
</ul>
<div class="tabContainer">
<div id="tabs-1" class="tabContent">
<p>Some content 1.</p>
</div>
<div id="tabs-2" class="tabContent">
<div class="subtabs">
<ul>
<li><a href="#subtab1">Subtab1</a></li>
<li><a href="#subtab2">Subtab2</a></li>
</ul>
<div id="subtab1" class="subtabContent">
Some sub content1
</div>
<div id="subtab2" class="subtabContent">
Some sub content2
</div>
</div>
</div>
<div id="tabs-3" class="tabContent">
<p>Some content 3</p>
</div>
</div>
</div>
</body>
</html>
blow the nested tabs of jqueryui script code add:
<script type="text/javascript">
// Code goes here
$(document).ready(function() {
jQuery( ".tabs" ).tabs();
jQuery( ".subtabs" ).tabs();
openParentTab();
});
function openParentTab() {
locationHash = location.hash.substring( 1 );
console.log(locationHash);
// Check if we have an location Hash
if (locationHash) {
// Check if the location hash exsist.
var hash = jQuery('#'+locationHash);
if (hash.length) {
// Check of the location Hash is inside a tab.
if (hash.closest(".tabContent").length) {
// Grab the index number of the parent tab so we can activate it
var tabNumber = hash.closest(".tabContent").index();
jQuery(".tabs.fix").tabs({ active: tabNumber });
// Not need but this puts the focus on the selected hash
hash.get(0).scrollIntoView();
setTimeout(function() {
hash.get(0).scrollIntoView();
}, 1000);
}
}
}
}
</script>
Today,I will learn you how to create autocomplete search using typeahead js in laravel 8. We will show example of laravel 8 autocomplete search using typeahead js. We will share with you how to build search autocomplete box using jQuery typehead js with ajax in laravel 8.i will use jQuery typehead js plugin, bootstrap library and ajax to search autocomplete in laravel 8 app.
Here, I will give you full example for Laravel 8 ajax autocomplete search using typeahead js as bellow.
Step 1: Install Laravel 8 Application
we are going from scratch, So we require to get fresh Laravel application using bellow command, So open your terminal OR command prompt and run bellow command:
In this step, configure database with your downloded/installed laravel 8 app. So, you need to find .env file and setup database details as following:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db name
DB_USERNAME=db user name
DB_PASSWORD=db password
Step 3: Add Dummy Record
In this step,I will Generate dummy records into database table users. So, navigate database/seeders/ directory and open DatabaseSeeder.php file. Then add the following two line of code it.
use App\Models\User;
User::factory(100)->create();
After that, open command prompt and navigate to your project by using the following command:
cd / Laravel8TypeheadTutorial
Now, open again your terminal and type the following command on cmd to create tables into your selected database:
php artisan migrate
Next, run the following database seeder command to generate dummy data into database:
php artisan db:seed --force
Step 4: Create Routes
Now in this step, open your web.php file, which is located inside routes directory. Then add the following routes into web.php file:
use App\Http\Controllers\AutocompleteSearchController;
Route::get('/autocomplete-search', [AutocompleteSearchController::class, 'index'])->name('autocomplete.search.index');
Route::get('/autocomplete-search-query', [AutocompleteSearchController::class, 'query'])->name('autocomplete.search.query');
Step 5: Creating Auto Complete Search Controller
Here in this step,I will create search AutocompleteSearch controller by using the following command.
Today, I will learn you to create validation lt in laravel.we will show example of laravel validation lt.The given field The field under validation must be less than the given field. The two fields must be of the same type. Strings, numerics, arrays, and files are evaluated using the same conventions as the size rule.
Here, I will give you full example for simply lt validation in laravel bellow.
In this example, I will explain you how to use toggle switch button in vue js. wr will show example of toggle switch button in vue js.we will use vue-js-toggle-button npm package for bootstrap toggle button example. vue cli toggle button is a simple, pretty and customizable.
vue-js-toggle-button provide way to change label and make it default checked. you can also customize several option like value, sync, speed, color, disabled, cssColor, labels, switchColor, width, height, name and with change event.
below i will give you simple example from starch so, you can see full example use it in your app.
Step 1: Create Vue JS App
Now this step, we need to create vue cli app using bellow command:
vue create myAppSwitch
Step 2: Install vue-js-toggle-button package
below we need to install vue-js-toggle-button npm package for toggle switch.
npm install vue-js-toggle-button --save
Step 3: Use vue-js-toggle-button
In this step, We need to use vue-js-toggle-button package in main.js file of vue js app.
src/main.js
import Vue from 'vue'
import App from './App.vue'
import ToggleButton from 'vue-js-toggle-button'
Vue.config.productionTip = false
Vue.use(ToggleButton)
new Vue({
render: h => h(App),
}).$mount('#app')
Step 4: Update App.vue File
Now this step, we need to update app.vue file, because i updated component so.
src/App.vue
<template>
<div id="app">
<Example></Example>
</div>
</template>
<script>
import Example from './components/Example.vue'
export default {
name: 'app',
components: {
Example
}
}
</script>
Step 5: Create Example Component
Here, we will create Example.vue component with following
Today, I will learn you to create validation image in laravel.we will show example of laravel validation image.The file under validation must be an image (jpg, jpeg, png, bmp, gif, svg, or webp).
Here, I will give you full example for simply image validation in laravel bellow.
Today,I will learn you how to convert pdf to image in laravel. we will Pdf To Image Convert using imagick package. you can easyliy convert pdf to image any formate in laravel. if you want to convert pdf to image than you can use here example. we will show setp by step example laravel pdf to image convert.
Here, I will give you full example for pdf to image convert in laravel as below.
Step 1: Install Laravel
we are going from scratch, So we require to get fresh Laravel application using bellow command, So open your terminal OR command prompt and run bellow command:
composer create-project --prefer-dist laravel/laravel blog
Step 2: Installing Imagick PHP Extension And Configuration
Here In this step, I will install the Imagick PHP extension is available from the Ubuntu’s repositories. Like ImageMagick, to do an imagick php install we can simply run the apt install command.
sudo apt install php-imagick
If you require a previous version of php-imagick, you can list the version available from the Ubuntu repositories using the apt list command. This would be useful in the event that the latest patch introduces regressions, which is fairly uncommon.
sudo apt list php-magick -a
The -a flag tells apt to list all version of a package available from the repositories. The output will look similar to the following, and at the time of this writing, there was only a single version available.
Installing the module alone isn’t enough. In order for any new PHP extension to be used with your web application Apache must be restarted.
sudo systemctl restart apache2
Verify Installation
To verify the installation was successful and that the module is enabled properly, we can use php -m from the command line, and grep the results to limit the output to only the line that is important.
Run the following command to verify the installation.
php -m | grep imagick
If the installation was successful, the output of the command will simply show one line, and it will only contain the name of the module imagick.
imagick
For a much more detailed verification of whether the PHP module was installed correctly, use the phpinfo() method.
From the command line, run the following command
php -r 'phpinfo();' | grep imagick
Which will output the following information, where the modules status is shown as enabled.
Alternatively, by adding the phpinfo() function to a php script, and then accessing the script from a web browser, we are able to see the module is installed and enabled.
After some authorization change in fowling the path
Now, we need to add resource route for pdf to image convert in laravel application. so open your "routes/web.php" file and add following route.
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\FromController;
Route::get('form', [FromController::class, 'index'])->name('form');
Step 3: Create Controller
here this step now we should create new controller as FromController,So run bellow command for generate new controller
php artisan make:controller FromController
At last step we need to update FromController.php.
<?php
namespace App\Http\Controllers;
use Imagick;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Blade;
class FromController extends Controller
{
/**
* Write code on Method
*
* @return response()
*/
public function index()
{
$imagick = new Imagick();
$imagick->readImage(public_path('dummy.pdf'));
$imagick->writeImages('converted.jpg', true);
dd("done");
}
}
Now we are ready to run our custom validation rules example so run bellow command for quick run:
Today, I will learn you to create validation accepted in laravel.we will show example of laravel validation accepted.The field under validation must be "yes", "on", 1, or true. This is useful for validating "Terms of Service" acceptance or similar fields.
Here, I will give you full example for simply accepted validation in laravel bellow.
Today, I will learn you to create validation required in laravel.we will show example of laravel validation required.
The field under validation must be present in the input data and not empty. A field is considered "empty" if one of the following conditions are true
The value is null.
The value is an empty string.
The value is an empty array or empty Countable object.
The value is an uploaded file with no path.
Here, I will give you full example for simply required validation in laravel bellow.
In this tutorial,i will show you how to implement server side validation example,it can easyli Codeigniter Server Side Form Validation With Error Message in this example,normal validation two sides like server side and client side, i will give you simple example of form validation in codeigniter application. we will use form_validation library for add form validation with error message display in codeigniter.
we can use defaulut following validation rules of codeigniter.We can use default following validation rules of codeigniter
So here i gave you full example of form validation in codeigniter application. i created simple form with first name, last name, email and Mobile Number like contact us form and i set server side validation.
Step:1 Download Codeigniter Project
Here in this step we will download the latest version of Codeigniter, Go to this link Download Codeigniter download the fresh setup of codeigniter and unzip the setup in your local system xampp/htdocs/ . And change the download folder name "demo"
Step:2 Basic Configurations
Here in this step,we will set the some basic configuration on config.php file, so let’s go to application/config/config.php and open this file on text editor.
Set Base URL like this
$config['base_url'] = 'http://localhost/demo/';
Step:3 Create Database With Table
Here in this step,we need to create database name demo, so let’s open your phpmyadmin and create the database with the name demo. you can use the below sql query for creating a table in your database.
CREATE TABLE users (
id int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary Key',
first_name varchar(100) NOT NULL COMMENT 'Name',
last_name varchar(100) NOT NULL COMMENT 'Name',
email varchar(255) NOT NULL COMMENT 'Email Address',
contact_no varchar(50) NOT NULL COMMENT 'Contact No',
created_at varchar(20) NOT NULL COMMENT 'Created date',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='datatable demo table' AUTO_INCREMENT=1;
Step:4 Setup Database Credentials
Here in this step,we need in this step connect our project to database. go to the application/config/ and open database.php file in text editor.We need to setup database credential in this file like below.
Here in this step,we create a controller name Users.php.
In this controller we will create some method/function. We will build some of the methods like :
-> Index() – This is used to display a form.
-> post_validate() – This is used to validate data on server side and store a data into database.
<?php
class Users extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->library(array('form_validation','session'));
$this->load->helper(array('url','html','form'));
$this->load->database();
}
public function index()
{
$this->load->view('form_validation');
}
public function post_validate()
{
$this->form_validation->set_rules('first_name', 'First Name', 'required');
$this->form_validation->set_rules('last_name', 'Last Name', 'required');
$this->form_validation->set_rules('contact_no', 'Contact No', 'required');
$this->form_validation->set_rules('email', 'Email', 'required');
$this->form_validation->set_error_delimiters('<div class="error">','</div>');
$this->form_validation->set_message('required', 'Enter %s');
if ($this->form_validation->run() === FALSE)
{
$this->load->view('form_validation');
}
else
{
$data = array(
'first_name' => $this->input->post('first_name'),
'last_name' => $this->input->post('last_name'),
'contact_no' => $this->input->post('contact_no'),
'email' => $this->input->post('email'),
);
$insert = $this->db->insert('users', $data);
if ($insert) {
$this->load->view('success');
} else {
redirect( base_url('users') );
}
}
}
}
Step:6 Create Views
Now in this step we will create a form_validation.php , go to application/views/ folder and create form_validation.php file. Here put the below html code for showing form.
In this tutorial, i will give you simple example of ajax image upload with preview in php. Uploading image via an jquery AJAX in php. I have added code for doing PHP image upload with AJAX without reloading the page.
xI use jQuery AJAX to implement image upload. There is a form with file input field and a submit button. On submitting the form with the selected image file, the AJAX script will be executed. In this code, it sends the upload request to PHP with the uploaded image. PHP code moves the uploaded image to the target folder and returns the image HTML to show the preview as an AJAX response.
The following code shows the HTML for the image upload form. On submitting this form the AJAX function will be called to send the request to the PHP image upload code.
Today, I will learn you how to use fullcalendar with livewire example. We will explain step-by-step laravel livewire fullcalendar integration. you can easily make livewire fullcalendar integration in laravel. we will describe laravel livewire fullcalendar integration.
Here, I will give you full example for simply livewire fullcalendar integration in laravel native as bellow.
Step 1 : Install Laravel App
In First step, We need to get fresh laravel version application using bellow command. So Let's open terminal and run bellow command.
composer create-project --prefer-dist laravel/laravel blog
Step 2 : Setup Database Configuration
After successfully install laravel app thenafter configure databse setup. We will open ".env" file and change the database name, username and password in the env file.
In this step, You will simply install livewire to our laravel application using bellow command:
composer require livewire/livewire
Step 4 : Create items Table and Model
In this step we have to create migration for items table using Laravel php artisan command, so first fire bellow command:
php artisan make:model Event -m
After this command you have to put bellow code in your migration file for create items table.
following path: /database/migrations/2021_04_10_102325_create_events_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('events', function (Blueprint $table) {
$table->id();
$table->string('title');
$table->string('start');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('events');
}
}
Now we require to run migration be bellow command:
php artisan migrate
After you have to put bellow code in your model file for create items table.
following path:/app/Models/Event.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
use HasFactory;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title',
'start',
];
}
Step:5 Create Route
In thi step,now, we need to add resource route for livewire fullcalendar integration in application. so open your "routes/web.php" file and add following route.
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Livewire\Calendar;
use App\Models\Event;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::view('/', 'home');
Livewire::component('calendar', Calendar::class);
Step 6 : Create Component
Now, You can create livewire component using bellow command, So Let's run bellow command to create calendar form component:
Today, I will learn you to create validation digits in laravel.we will show example of laravel validation digits.The field under validation must be numeric and must have an exact length of value.
Here, I will give you full example for simply Validation digits in laravel bellow.
This example is focused on fullcalendar v4 disable drag and drop event. This article will give you simple example of full calendar v4 drag and drop disable. you will learn how to disable drag and drop fullcalendar vs4 event. you will learn disable drag and drop fullcalendar v4 . Let's get started with disable drag and drop in fullcalendar v4.
In this blog, I will explain how to disabled event disabled drag and drop in fullcalendar. We will show example of fullcalendar v4 disabled drag and drop. you can simple copy bellow code and use in your project. It's pretty easy and simple example of fullcalendar v4 disabled event drag and drop .In this example, you can easy to create disabled event drag and drop in fullcalendar v4.
Here the example of disabled drag and drop in fullcalendar.
Disabled Drag And Drop Event Code:
This determines if the events can only drag and drop Enables/disables at a time.
droppable: false
Or
This determines if the events can be dragged and resized. Enables/disables both at the same time.
editable:false
Example: 1
Now In this example droppable method using disables drag and drop events in fullcalendar.
In this example, i will show you fullcalendar v4 remove event example. This article goes in detailed on fullcalendar v4 delete event. We will use fullcalendar remove event example code. i would like to share with you fullcalendar v4 remove event basic example.
I will show the example of fullcalendar v4 remove event.We will show basic example of fullcalendar v4 remove event. we will create fullcalendar delete event using version 4 you can get code of remove eventin fullcalendar. we give you example of step by step fullcalendar remove event, you can simple copy bellow code and use in your project. It's pretty easy and simple example of fullcalendar v4 delete event.In this example, you can easy to create fullcalendar v4 remove event.
Here the example of fullcalendar v4 remove event
Remove Event Code:
var event = calendar.getEventById(EventID);
event.remove();
Example
Now this example in create basic fullcalendar remove event for full code:
Today our leading topic is fullcalendar v4 add event example. This tutorial will give you simple example of fullcalendar v4 add event. this example will help you fullcalendar add event example code. this example will help you fullcalendar v4 add event basic example.
I will show the example of fullcalendar v4 add event.I will show basic example of fullcalendar v4 add event. we will create fullcalendar add event using version 4 you can get code of add eventin fullcalendar. we give you example of step by step fullcalendar add event, you can simple copy bellow code and use in your project. It's pretty easy and simple example of fullcalendar v4 add event.In this example, you can easy to create fullcalendar v4 add event.
In this artical, I will show you how to check current date between two dates in php. current date between two date check in using php.
You can check date between two dates using php .You can get current date then start date and end date between date then return true otherwise false return.