我想根据div
中的price元素创建一个过滤div的脚本JavaScript价格滑块为:
<script type="text/javascript">
tjq(document).ready(function() {
tjq("#price-range").slider({
range: true,
min: 0,
max: 1000,
values: [ 100, 800 ],
slide: function( event, ui ) {
tjq(".min-price-label").html( "€" + ui.values[ 0 ]);
tjq(".max-price-label").html( "€" + ui.values[ 1 ]);
}
});
tjq(".min-price-label").html( "€" + tjq("#price-range").slider( "values", 0 ));
tjq(".max-price-label").html( "€" + tjq("#price-range").slider( "values", 1 ));
tjq("#rating").slider({
range: "min",
value: 40,
min: 0,
max: 50,
slide: function( event, ui ) {
}
});
});
</script>
div是:
<article class="box">
<figure class="col-sm-5 col-md-4">
<a title="" href="https://www.bookingassist.ro/test/html/ajax/slideshow-popup.html" class="hover-effect popup-gallery"><img width="270" height="160" alt="" src="http://placehold.it/270x160"></a>
</figure>
<div class="details col-sm-7 col-md-8">
<div>
<div>
<h4 class="box-title"><?php echo $hotelName5;?><small><i class="soap-icon-departure yellow-color"></i><?php echo $hotelAddress5;?>-<?php echo $hotelDestination5;?></small></h4>
<div class="amenities">
<i class="soap-icon-wifi circle"></i>
<i class="soap-icon-fitnessfacility circle"></i>
<i class="soap-icon-fork circle"></i>
<i class="soap-icon-television circle"></i>
</div>
</div>
<div>
<div class="five-stars-container">
<span class="five-stars" style="width: 80%;"></span>
</div>
<span class="review">270 reviews</span>
</div>
</div>
<div>
<p><?php echo $hotelDescription5;?></p>
<div>
<span class="price"><small>pret/sejur</small>€ <?php echo $hotelPrices[5];?> <br/>
</span>
<a class="button btn-small full-width text-center" title="" href="#">BOOK</a>
</div>
</div>
</div>
</article>
作为一个例子,我想从链接创建动作作为示例:http://www.soaptheme.net/wordpress/travelo/?post_type=accommodation&s
请您在这个或一些例子中告诉我。