Jquery

Jquery Url:   <script src="https://code.jquery.com/jquery-1.10.2.js"></script>


Price Range 

 <h6>Price Range</h6>
 <div class="slider_wrap">          
<div id="price-range"></div>
<div class="slide-result">
<input disabled="" class="amount1" type="text" id="pr1" />
<input disabled="" class="amount2" type="text" id="pr2" value="$ 1500" />
<div class="clr"></div>
</div>
</div>


Script

$('#price-range').on('slidestop',function() {getData(0)} );
var minprice=$( "#price-range" ).slider( "values", 0 );
var maxprice=$( "#price-range" ).slider( "values", 1 );


 <script>
// slider value
$(function() {
$("#price-range").slider({ range: true, min: <?=$Min_Price?>,

 max: <?=$Max_Price?>, values: [ <?=$Min_Price?>, <?=$Max_Price?> ], step: 1, 
animate: "fast", slide: function( event, ui ) {
    $("#pr1").val( "\u00A3" + ui.values[ 0 ] );
    $("#pr2").val( "\u00A3" + ui.values[ 1 ] );
    }
    });
    $("#pr1").val( "\u00A3" + $( "#price-range" ).slider( "values", 0 ) );
    $("#pr2").val( "\u00A3" + $( "#price-range" ).slider( "values", 1 ) );
    $('#price-range').wrap('<div id="themesl"></div>');

// rateing stars
$("#star-range").slider({ range: "min", value: 3, min: 1, max: 15, step: 1, animate: "fast", slide: function( event, ui ) {
    $( "#sr" ).val( ui.value + " Ratings" );
    }
    });
    $( "#sr" ).val( $( "#star-range" ).slider( "value" ) + " Ratings" );   
    $('#star-range').wrap('<div id="themesl"></div>');

// user range
$("#user-range").slider({ range: "min", value: 10, min: 1, max: 30, step: 1, animate: "fast", slide: function( event, ui ) {
    $( "#ur" ).val( ui.value + " Users" );
    }
    });
    $( "#ur" ).val( $( "#user-range" ).slider( "value" ) + " Users" );   
    $('#user-range').wrap('<div id="themesl"></div>');

// discount range
$("#discount-range").slider({ range: "min", value: 10, min: 1, max: 100, step: 1, animate: "fast", slide: function( event, ui ) {
    $( "#dr" ).val( ui.value + "% " );
    }
    });
    $( "#dr" ).val( $( "#discount-range" ).slider( "value" ) + "% " );   
    $('#discount-range').wrap('<div id="themesl"></div>');
   

});

function resetall() {
    var $pslider = $("#price-range").slider("values", 0, 200);
    $pslider.slider("values", 1, 1500);
    var $rslider = $("#star-range");
    $rslider.slider("value", 3);
   
    var $rslider = $("#user-range");
    $rslider.slider("value", 10);
   
    $( "#pr1" ).val( "$ " + $( "#price-range" ).slider( "values", 0 ) );
    $( "#pr2" ).val( "$ " + $( "#price-range" ).slider( "values", 1 ) );
    $( "#sr" ).val( $( "#star-range" ).slider( "value" ) + " Ratings" );
   
    $( "#ur" ).val( $( "#user-range" ).slider( "value" ) + " Users" );
    $('#locmore').slideUp('slow', function() { });
}


</script>


<script>
$('#submit').on('click',function(){

if($('#terms_conditions:checked').length=='0')
{ alert('Please checke terms and conditions'); return false;}
})
</script>

No comments:

Post a Comment