Question: how to refresh the particular div while click image


how to refresh the particular div while click image

Answers 1
Added at 2016-12-31 10:12

I want to refresh div using image onclick. Here i have image,that image id's are 'sellhide',having the onemore div id's are 'sellChart'. Code:

<div class="col-xs-12 col-lg-6 col-sm-6 col-md-6 index_table_three" id="sellChart">
                        <div class="row" id="title">
                            <div class="col-xs-6 col-sm-6 col-lg-6 col-md-6" id="">
                                {{ Form::open(array('url' => 'lookup/be-check', 'enctype' => 'multipart/form-data', 'class' => 'form-inline', 'id' => 'sellChartForm')) }}                                    
                                {{ Form::select('date_time', array($end_date.';'.$today => 'today', $lastWeek.';'.$today => 'Last 7 days', $lastMonth.';'.$today => 'One Month', '' => 'Custom Range'), $end_date.';'.$today, array('id' => 'date_time', 'onchange' => 'GetChangeDate()')) }}
                                {{ Form::Submit('Apply', array('id' => 'getSellRange', 'class' => 'getSellRange'))}}
                                {{ Form::close() }}
                            <div class="col-xs-4 col-sm-4 col-lg-4 col-md-4" id="">
                                <h4>Sell property lists</h4>
                            <div class="col-xs-2 col-sm-2 col-lg-2 col-md-2" id="">
                                <img src="<?php echo SITE_PATH . '/mb-images/reset.png' ?>" width="35px;" height="35px;" class="img-responsive center-block" id="sellhide" />
                        <div class="row" id="sellDrawChart">
                            <h5 style="margin-right:70%;"><b>Property type</b></h5>
                            <canvas id="sellCanvas" ></canvas>
                            <h6 style="margin-top:0px;margin-left:80%;"><b>No of property count</b></h6>


$(function() { 
      $( '#sellhide' ).on( 'click', function() { 

I have tried many ways its not accepted the script.

nr: #1 dodano: 2016-12-31 10:12

Use jQuery get() method:

For example:

$.get( "ajax/test.html", function( data ) {
  $( ".result" ).html( data );
  alert( "Load was performed." );
Source Show
◀ Wstecz