Results 1 to 4 of 4
Thread: Javascript - .
Hybrid View
-
28th March 2013 13:56 #1Registered User
Join Date: Mar:2005
Location: Sofia
Posts: 166
Javascript - .
, javascript.
:
JQuery -
<script>
$( "#slider" ).slider(
{
range: true ,
step: 100,
max: 3000,
values: [ 0, 3000 ],
slide: function( event, ui ) {
$( "#slider-result" ).html( ui.values[1] + '.' );
}
}
);
</script>
<div id="slider-result">3000.</div>
div-, ID- php:
<div id="1">1
<div id="price"><?= 100 ?></div>
</div>
<div id="2">2
<div id="price"><?= 200 ?></div>
</div>
JQuery, :
$('#" . $intId . "').show('slow')
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
, range-a range-a .
-
28th March 2013 23:20 #2Registered User
Join Date: Mar:2008
Location: Buglaria
Posts: 86
ID-, ID- , 1 . .
API- slider-a ( jQuery ui, ):
CSS div.filtered . $('div') , .Code:$( "#slider" ).slider({ range: true , step: 100, max: 3000, values: [ 0, 3000 ], slide: function( event, ui ) { $( "#slider-result" ).html( ui.values[1] + '.' ); var getMin = ui.values[0], getMax = ui.values[1]; //filter $('div').each(function(){ var $self = $(this), itemPrice = $self.find('.price').text(); if(itemPrice < getMin || itemPrice > getMax){ $self.addClass('filtered'); }else{ $self.removeClass('filtered'); } }); } });
PS , , .
-
29th March 2013 13:54 #3Registered User
Join Date: Mar:2005
Location: Sofia
Posts: 166
, . - . , , , . . ?
-
30th March 2013 00:41 #4Registered User
Join Date: Mar:2008
Location: Buglaria
Posts: 86
HTML ( ), .




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in