php if dropdown option value 0 then hide div - php

as I am not experienced with php, I need some help solving my issue.
I pasted the snippet of php I believe needs editing.
<div class="selectBox" id="products-variation-container">
<select class="product-variation-dropdown" name="product-variation" id="sel-product-variation">
<option value="0"><?php _e('Select variation', 'wp-woo-leasing'); ?></option>
</select>
</div>
<!-- <input type="submit" name="btn-submit" class="button alt" id="leasingAddItem" value="<?php _e('Add Item', 'wp-woo-leasing'); ?>"
data-value="<?php _e('Add Item', 'wp-woo-leasing'); ?>" />-->
</div>
</div>
<div class="leasing-single-container" >
<div class="leasing-col1" >
<div id="product-description" class="product-description"></div>
<div id="product-price-details" class="product-price-details"></div>
</div>
My issue is that I want my code to be like:
<select class="product-variation-dropdown" name="product-variation" id="sel-product-variation">
<option value="0"><?php _e('Select variation', 'wp-woo-leasing'); ?>
If option value = "0" then hide the following div, upon loading site, since default is value is 0.
<div id="product-description" class="product-description"></div>
I hope you understand my question, and I hope that you can guide me to approaching this issue, thanks.

You can use jQuery to show and hide div on basis of select value.
Wordpress have already included jquery file, so you no need to add it.
(https://developer.wordpress.org/reference/functions/wp_enqueue_script/).
Here is code you can use:
<div class="selectBox" id="products-variation-container">
<select class="product-variation-dropdown" name="product-variation" id="sel-product-variation" onchange="getval();">
<option value="0">Select Option</option>
<option value="1">Select Option1</option>
</select>
</div>
<div class="leasing-single-container" >
<div class="leasing-col1" >
<div id="product-description" class="product-description">dgsdgsdgsdgsdgsd</div>
<div id="product-price-details" class="product-price-details"></div>
</div>
</div>
<script>
jQuery(document).ready(function() {
var sel = jQuery('select[name=product-variation]').val();
if(sel == 0) {
jQuery('#product-description').attr('style', 'display:none');
}
jQuery('#sel-product-variation').on('change', function() {
var sel = jQuery('select[name=product-variation]').val();
if(sel == 0) {
jQuery('#product-description').attr('style', 'display:none');
}
else {
jQuery('#product-description').attr('style', 'display:block');
}
});
});
</script>
Let me know incase of any concern for the same.

Related

Make certain criteria appear when selection is made?

User have some options, upon selecting one of them, I want to show more options which will depend on first selected option. Say, user has options to select the number of gates, like 1 or 2. Upon selecting a number I want to show options of all the gates lower than that number. That is,
if 1 is selected, show options of only gate 1.
if 2 is selected, show options of gate 2 and gate 1.
I have most of the variables within my phpmyadmin for storage purposes to avoid having to create alot of variables in the code. Just want some suggestions and if you see anything I can improve let me know.
<div class="form-div-element">
<label># of Gates</label>
<select class="gates-change" name="no_gate" required>
<option value="">Select Gate</option>
<option value="28">1 Gate</option>
<option value="29">2 Gates</option>
</select>
</div>
<?php
if($result)
{
foreach($result as $row)
{
if($row->id == 31 || $row->id == 32 || $row->id == 33)
{?>
<div class="form-div-element ecl-variation ecl-variation<?php echo $row->id;?>" style="display:block!important">
<?php }
else
{?>
<div class="form-div-element ecl-variation ecl-variation<?php echo $row->id;?>">
<?php }?>
<label><?php echo $row->variation_name;?></label>
<?php
if($row->variation_name == 'Stops')
{?>
<input type="hidden" name="stopvariationid" value="<?php echo $row->id;?>" id="stopvariationid"/>
<?php }
?>
<?php
$var_value = (explode("|",$row->variation_value));
$var_condition = $row->conditions;
$arr = array('height_convert_configuration');
//if($row->special_features != '')
//{
// check_special_function($var_value,$row->special_features,$var_condition);
//}
//else if($row->variation_type =='selectbox')
if($row->variation_type =='selectbox')
{
if($row->variation_function == 'calculation')
{?>
<select onchange = 'change_variation(this.value,<?php echo $row->id;?>)'>
<option value="">Select Option</option>
<?php for($i=0;$i<count($var_value);$i++)
{?>
<option value="<?php echo $var_value[$i];?>"><?php echo $var_value[$i];?></option>
<?php }?>
</select>
<?php }
else
{ ?>
<select class="gate_datatype" name="gate_type">
<option value="">Select Option</option>
<?php for($i=0;$i<count($var_value);$i++)
{?>
<option value="<?php echo $var_value[$i];?>|<?php echo $row->special_features;?>"><?php echo $var_value[$i];?></option>
<?php }?>
</select>
<?php }
}
else if($row->variation_type =='textbox')
{?>
<?php for($i=0;$i<count($var_value);$i++)
{?>
<?php echo $var_value[$i];?>
<?php }?>
<?php }
else if($row->variation_type =='radiobox')
{?>
<?php for($i=0;$i<count($var_value);$i++)
{?>
<div class="radiobox-cont">
<input onchange = 'change_radio_variation(this,this.value,<?php echo $row->id;?>)' type="radio" name="<?php echo $row->class;?>" value='<?php echo $var_value[$i];?>' /><?php echo $var_value[$i];?>
</div>
<?php }?>
<?php }
else if($row->variation_type =='checkbox')
{?>
<?php for($i=0;$i<count($var_value);$i++)
{?>
<div class="checkbox-cont <?php echo preg_replace('/\s+/', '_', $var_value1[$i]);?>">
<?php if('Cabin Telephone' == $var_value[$i])
{?>
<input checked type="checkbox" onchange="change_check_varitaion(this,this.value,<?php echo $row->id;?>)" name="other_option[]" value='<?php echo $var_value[$i];?>' disabled="disabled" /><?php echo $var_value[$i];?>
<?php }
else
{?>
<input type="checkbox" onchange="change_check_varitaion(this,this.value,<?php echo $row->id;?>)" name="other_option[]" value='<?php echo $var_value[$i];?>' /><?php echo $var_value[$i];?>
<?php }?>
</div>
<?php }?>
<?php }?>
</div>
<?php }
You can do this in two ways first way is to do ajax and second way is using css.
First method suppose this is your select code where you can select gate
<div class="form-div-element">
<label># of Gates</label>
<select id="gates" onchange="change()" class="gates-change" name="no_gate" required>
<option value="">Select Gate</option>
<option value="28">1 Gate</option>
<option value="29">2 Gates</option>
</select>
</div>
// and this is your sub gates options which will be empty at first and its display will be none
<div id="subgates_div" class="form-div-element" style="display:none;">
<label># of Sub Gates</label>
<select id="subgates" class="gates-change" name="sub_no_gate" required>
<option value="">Select Sub Gate</option>
</select>
</div>
on selecting gate what you can do is use ajax to get the sub options of the selected gate like this. in this code your url and my url will be different.
function change() {
var selected = $('#gates').find(":selected").attr("value");
$.ajax({
type: "POST",
url: '<?php echo base_url('get_sub_options') ?>',
dataType: 'json',
data: {category: selected},
success: function (data) {
console.log(data);
//remove disabled from province and change the options
$('#subgates_div').show();
$('select[name="sub_no_gate"]').html(data.subgates);
}
});
}
and your php function should be like this here first i have made an array named subgates. and i have retrieved subgates from database using the value from post. this query might be different in your case. the i have applied foreach loop for sub gates and created a new option element with respective subgate id and subgate name and appended it to array. and at last the array is returned using json_encode
function get_sub_category() {
$data['subgates'] = array();
$subgates = $this->db->get_where('subcategories', array('id' => $_POST['category']))->result();
foreach ($subgates as $key => $val) {
$data['subgates'][] = <<<EOD
<option value='$val->id'>$val->sub_gate_name</option>
EOD;
}
echo json_encode($data);
}
and the other method is using css. to do this you should list all this options of gate and subgates at first. like this
// gates options
<div class="form-div-element">
<label># of Gates</label>
<select id="gates" onchange="change()" class="gates-change" name="no_gate" required>
<option value="">Select Gate</option>
<option value="28">1 Gate</option>
<option value="29">2 Gates</option>
</select>
</div>
//sub gate options one
<div id="subgates-<?php echo $subgates->id; ?>" class="form-div-element" style="display:none;">
<label># of Sub Gates</label>
<select id="subgates" class="gates-change" name="sub_no_gate" required>
<option value="">Select Sub Gate</option>
</select>
</div>
//sub gate option 2
<div id="subgates-<?php echo $subgates->id; ?>" class="form-div-element" style="display:none;">
<label># of Sub Gates</label>
<select id="subgates" class="gates-change" name="sub_no_gate" required>
<option value="">Select Sub Gate</option>
</select>
</div>
// and so on
In this case what you should remember is that your sub gates option div id should be dynamic and display will be none at first
now when you select a gate use onchange and change the display css of respective sub gates like this
function change() {
$(".form-div-element").hide();
var selected = $('#gates').find(":selected").attr("value");
$('#subgates-'+selected).show();
}
hope this will give you some idea and if you have any confusion feel free to ask
All in all it seems to me that your question actually contains 2 questions:
How to dynamically show/hide DOM elements based on user selection
Upon selecting a number I want to show options of all the gates lower than that number.
How to optimize your PHP code
Just want some suggestions and if you see anything I can improve let me know.
Number two is way to broad! Maybe just one quick suggestion: If it works then its fine. Overlooked it fast and seems to be ok.
See my working snippet for number one, which actually only needs a little customization of your existing source code (if any at all). Don't forget its just a mockup; if you need some further help or want some deeper explanations about whats going on then let me know...
jQuery('.form-div-element').not('.ecl-variation').find('select').on('change', function() {
var i = -1,
$conditional = jQuery('.ecl-variation').hide(), // hide in advance
iGates = +(jQuery(this).find('option:selected').attr('data-gates-sum')); // get required gate(s) based on selected options "data-gates-sum"-attribute
// version based on text: `iGates = +($(this).find('option:selected').text().split(' ')[0])` | pro: no additional markup, con: error prone, maintenance
// count up to required gate(s) and make them visible
while ( ++i < iGates ) {
$conditional[i].style.display = 'block';
}
});
.ecl-variation{
display: none; /* hide conditional selects in advance */
}
<!-- minimized mockup -->
<div class="form-div-element">
<label># of Gates</label>
<select>
<option value="">Select Gate</option>
<!-- decided to add a data attribute instead of relying on text which could change more likely (maintenance) -->
<option value="28" data-gates-sum="1">1 Gate</option>
<option value="29" data-gates-sum="2">2 Gates</option>
</select>
</div>
<div class="form-div-element ecl-variation">
<label># of Gates | conditial 1</label>
<select>
<option value="">Select Gate Sub</option>
<option value="3">abc</option>
<option value="4">xyz</option>
</select>
</div>
<div class="form-div-element ecl-variation">
<label># of Gates | conditial 2</label>
<select>
<option value="">Select Gate Sub</option>
<option value="5">123</option>
<option value="6">789</option>
</select>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
How to implement?
.ecl-variation{
display: none; /* hide conditional selects in advance */
}
<body>
<!-- minimized mockup -->
<div class="form-div-element">
<label># of Gates</label>
<select>
<option value="">Select Gate</option>
<option value="28" data-gates-sum="1">1 Gate</option>
<option value="29" data-gates-sum="2">2 Gates</option>
</select>
</div>
<div class="form-div-element ecl-variation">
<label># of Gates | conditial 1</label>
<select>
<option value="">Select Gate Sub</option>
<option value="3">abc</option>
<option value="4">xyz</option>
</select>
</div>
<div class="form-div-element ecl-variation">
<label># of Gates | conditial 2</label>
<select>
<option value="">Select Gate Sub</option>
<option value="5">123</option>
<option value="6">789</option>
</select>
</div>
<!-- YOUR CODE ENDS HERE -->
<!-- load jquery from cdn -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<!-- provide a local copy as fallback in case that cdn is not available -->
<script>window.jQuery||document.write('<script src="path/to/your/local/copy/jquery-1.12.4.min.js"><\/script>')</script>
<!-- implement your custom site specific script(s) inline -->
<script>
(function( $ ) {
$('.form-div-element').not('.ecl-variation').find('select').on('change', function() {
var i = -1,
$conditional = $('.ecl-variation').hide(),
iGates = +($(this).find('option:selected').attr('data-gates-sum'));
while ( ++i < iGates ) {
$conditional[i].style.display = 'block';
}
});
})( jQuery )
</script>
<!-- instead of deploying your scripts inline you can load them also like this:
<script src="path/to/your/app.js"></script>
-->
</body><!-- make sure that your scripts are located just before the closing body tag -->

Redirect selected option on submit laravel

How can I redirect my selected option when I click submit?
I am trying to make a modal Sign Up that is located in the header for different users. When the user choose one, they will then be redirected to specific sign up page.
This is from my header.blade.php
<div id="modal1" class="modal">
<div class="modal-content">
<h4>Choose Roles/Plan</h4>
<div class="input-field col s12">
<select id="select-action" name = "action">
<option value="" disabled selected>Choose your option</option>
<option value="basicsignup">Basic</option>
<option value="advancedsignup">Advanced</option>
<option value="teamsignup">Team</option>
</select>
</div>
</div>
<div class="modal-footer">
<button type="submit">Submit</button>
</div>
</div>
routes.php
Route::get('/basicsignup', function(){
return view('actions.basicsignup');
})->name('basicsignup');
Route::get('/advancedsignup', function(){
return view('actions.advancedsignup');
})->name('advancedsignup');
Route::get('/teamsignup', function(){
return view('actions.teamsignup');
})->name('teamsignup');
Edit: Original examples were animals, flowers, cars.. edited it for clarity at least.
You can simply use JavaScript onsubmit function to call a JS function than get your selected value and then you can submit a form with your customised url.
Example
<form method="post" id="myForm" onsubmit="return submitForm()">
<select id="select-action" name="action">
<option value="" disabled selected>Choose your option</option>
<option value ="animals">Animals</option>
<option value ="flowers">Flowers</option>
<option value ="cars">Cars</option>
</select>
<button type="submit">Submit</button>
</form>
<script type="text/javascript">
function submitForm() {
var selectedOption = $('#select-action').val();
var url = "";
if(selectedOption == 'animals') {
url = '{{ route('your/route')}}';
} else if (selectedOption == 'flowers') {
url = '{{ route('your/route')}}';
}
.
.
.
$('#myForm').attr('action', url);
$('form#myForm').submit();
return false;
}
</script>

page refreshes but doesn't update the new content

the code below works fine it updates the rank in db when submit button is clicked, but then it refreshes the page and loads the old content itself instead of updating with new content. how do i get it to load the new content on refresh.
<?php
function update_ranks($newimgurl,$newrank){
switch ($newrank)
{
case "1":
$rank="1st";
break;
case "2":
$rank="2nd";
break;
case "3":
$rank="3rd";
break;
}
$field_key = "field_582fdg46";
$value=array();
$count=0;
global $totalimgs;
global $allimgurl;
global $allimgranks;
while ($count < $totalimgs){
if ($allimgurl[$count]==$newimgurl){
$value[] = array("imglink" => $newimgurl,"rank" => $rank );
}
else{
$value[] = array("imglink" => $allimgurl[$count],"rank" => $allimgranks[$count] );
}
$count=$count+1;
update_field( $field_key, $value, $post->ID);
}
unset($newrank,$newimgurl,$currentnewrank,$currentimgurl,$rank,$count);
unset($allimgurl,
,$allimgranks,$totalimgs,$value);
}
?>
<?php
if(isset($_POST['rank1btn'])){
$currentnewrank=$_POST['rank1'];
$currentimgurl=$rank1img;
update_ranks($currentimgurl,$currentnewrank);
}
if(isset($_POST['rank2btn'])){
$currentnewrank=$_POST['rank2'];
$currentimgurl=$rank2img;
update_ranks($currentimgurl,$currentnewrank);
}
if(isset($_POST['rank3btn'])){
$currentnewrank=$_POST['rank3'];
$currentimgurl=$rank3img;
update_ranks($currentimgurl,$currentnewrank);
}
?>
<form id="myform" name="myform" action="" method="POST" >
<article class="col-xs-12 col-sm-12 col-md-12 col-lg-12 ">
<?php
global $post;
$bookid=get_the_title($post->ID);;
$args = get_posts(array('post_type' => 'bookgallery' ,'post_title' =>$bookid, 'posts_per_page' => -1
));
?>
<?php
foreach ( $args as $post ) : setup_postdata($post);
if (!empty($post))
{
$allimg=$allrank=array();
while( have_rows('imgs') ): the_row();
$temprank=get_sub_field('rank',$post->ID);
$tempimg=get_sub_field('imglink',$post->ID);
$allimg[]=$tempimg;
$allrank[]=$temprank;
if ($temprank=='1st') {
$rank1img= $tempimg;
$rank1='1st';
}
if ($temprank=='2nd') {
$rank2img= $tempimg;
$rank2='2nd';
}
if ($temprank=='3rd') {
$rank3img=$tempimg;
$rank3='3rd'
}
endwhile;
if (!empty($rank1img)){
?>
<div >
<img src="<?php echo $rank1img; ?>" alt="" >
<div >1st
<select name="rank1">
<option value="0"> </option>
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
</select>
</div>
<div ><input type="submit" name="rank1btn" value="update rank" id="rank1btn" ></div>
</div>
<?php }
if (!empty($rank2img)){
?>
<div >2nd
<img src="<?php echo $rank2img; ?>" alt="" >
<div >
<select name="rank2">
<option value="0"> </option>
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
</select>
</div>
<div ><input type="submit" name="rank2btn" value="update rank" id="rank2btn" ></div>
</div>
<?php }
if (!empty($rank3img)){
?>
<div>3rd
<img src="<?php echo $rank3img; ?>" alt="" >
<div>
<select name="rank3">
<option value="0"> </option>
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
</select>
</div>
<div><input type="submit" name="rank3btn" value="update rank" id="rank3btn" ></div>
</div>
<?php }
}
endforeach; ?>
</article>
</form>
i put the update_ranks first below that the isset code and below tht the form...now it doesn't even update the database whereas when i had the isset code below the form it used to update the db but the page refresh tht happens automatically didnt show the new content.u had to manually refresh the page to show the new content. how do i get it to load the new content automatically along with updating the db.
You are updating the database on the bottom of the page, so the content is loaded before your update query has been executed. This can be resolved by placing the update query above your html content.
This way the update will execute and after that you will load the new data from the database.
Remember that all code will always execute in the order it is placed in the file, even the rendering of html content.
I made a total newbie mistake. I have two copies of my files. One which my editor changes. The other I need to copy under nginx web directory /var/www/html/. I failed to copy my changes files, so nothing was updated.
I know this is a different root cause than the original question, but I'm afraid, probably a common reason why some people will not see their changes reflected (and hence, end up on stackoverflow).

Magento custom search form

I am trying to create custom search functionality in Magento 1.9. Instead of writing it from scratch, I want to piggy back the default search functionality and add in custom filters. First I copied the form.min template and replaced with drop downs that I want to use.
form.custom.phtml:
<?php
$catalogSearchHelper = $this->helper('catalogsearch');
$_helper = Mage::helper('catalog/category');
$_categories = $_helper->getStoreCategories();
?>
<form id="search_custom_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get">
<div class="select-box item">
<label for="finder">GIFT FINDER</label>
<select id="customS" name="finder">
<option value="">Please select</option>
<?php
foreach ($_categories as $key => $value) {
echo("<option value='" . $value["name"] . "'>" . $value["name"] . "</option>");
}
?>
</select>
</div>
<div class="item">
<label for="for">FOR</label>
<select id="for">
<option value="">Please select</option>
<option value="him">HIM</option>
<option value="her">HER</option>
</select>
</div>
<div classs="item">
<label for="delivery">DELIVERY OPTION</label>
<select id="delivery">
<option value="express">EXPRESS DELIVERY</option>
<option value="standard">STANDARD POST</option>
</select>
</div>
<div classs="item">
<label for="price">DELIVERY OPTION</label>
<select id="price">
<option value="<250">LESS THAN £250</option>
<option value=">250">MORE THAN £250</option>
</select>
</div>
<button type="submit" title="<?php echo $this->__('Find') ?>" class="button search-button"><span><span><?php echo $this->__('Find') ?></span></span></button>
<script type="text/javascript">
//<![CDATA[
var searchForm = new Varien.searchForm('search_custom_form', '', '');
//]]>
</script>
</form>
I have included the above template on my home page using {{block type="core/template" name="custom-search" as="custom-search" template="catalogsearch/form.custom.phtml"}}, I have copied the core files into my own template folder and now I find myself stuck.
Can anyone offer a better alternative or solution as to what I should do?
Thanks
Found a much easier option here. I copied the catalogsearch folder to my theme, copied the advanced search form and placed it on my home page. Now I can customise the form and the query as I see fit.

CodeIgniter, Jquery - append dropdown menu in form

Hi I'd like some help please. I have created a form in CodeIgniter in which I want to save the name of a movie and the actors who play in. My code looks like this:
<?php echo form_open().PHP_EOL; ?>
<div class="form-group">
<label for="title">Title *</label>
<?php echo form_input('title', set_value('title', html_escape($movie->title)), 'class="form-control"'); ?>
<?php echo form_error('title'); ?>
</div>
<h4>Cast</h4>
<button type="button" id="add_actor" class="btn btn-primary btn-sm">Add Actor</button>
<hr>
<ul class="list-unstyled" id="cast"></ul>
<div class="form-group">
<?php echo form_submit('save', 'Save', 'class="btn btn-primary"').PHP_EOL; ?>
</div>
<?php echo form_close().PHP_EOL; ?>
<script>
$(document).ready(function() {
var output = '<li style="margin-bottom:5px;">\
<div class="row">\
<div class="col-md-6">\
<?php echo form_dropdown("actors", $actors, null, "class=\"form-control\""); ?>\
</div>\
<div class="col-md-6">\
<input type="text" name="character[]" class="form-control"\ placeholder="Character" />\
</div>\
</div>\
</li>';
$('#add_actor').click(function() {
$('#cast').append(output);
});
});
On firebug I get this as output:
<script>
$(document).ready(function() {
var output = '<li style="margin-bottom:5px;">;\
<div class="row">;\
<div class="col-md-6">;\
<select name="actors" class="form-control">
<option value="5">Keira Knightley</option>
<option value="7">Matthew Goode</option>
<option value="6">Benedict Cumberbatch</option>
<option value="2">Christian Bale</option>
<option value="10">Jude Law</option>
<option value="4">Daniel Craig</option>
<option value="3">Brad Pitt</option>
<option value="1">Johnny Depp</option>
<option value="9">Sean Bean</option>
<option value="8">Pierce Brosnan</option>
<option value="11">Ed Harris</option>
<option value="12">Judi Dench</option>
</select>\
</div>\
<div class="col-md-6">\
<input type="text" name="character[]" class="form-control"\ placeholder="Character" />\
</div>\
</div>\
</li>';
$('#add_actor').click(function() {
$('#cast').append(output);
});
});
</script>
I probably guess that the error is caused because the form_dropdown() doesn't have the \ at the end of the line.
So what I'm trying to do basicly is when I click the "Add Actor" button the jquery will append a row in my form where it should have a dropdown menu for choosing the actor, and next to this dropdown an input field for typing the actor's character in the movie. When I click the "Add Actor" button again I will to the same process again to enter the next actor in the movie, etc etc.
However the code in the script tag doesn't work as I expected, In fact jquery complains for syntax error. I 'm checking my code and try some changes but no effect.
How can I make this work properly?
You should see an error like Uncaught SyntaxError: Unexpected token ILLEGAL in your console as you have ill formatted string literal.
Add \ at the end of each line for the output
var output = '<li style="margin-bottom:5px;">\
<div class="row">\
<div class="col-md-6">\
<?php echo form_dropdown("actors", $actors); ?>\
</div>\
<div class="col-md-6">\
<input type="text" name="character[]" class="form-control"\ placeholder="Character" />\
</div>\
</div>\
</li>';
You can't begin a new line at the middle of a string literal without telling the compiler that the string is continued in the next line, so in your case you can use the \ operator as given above to indicate that.
Demo: Fiddle

Categories