Thursday 15 September 2011

jquery - set value of slider with if else -


I have something like this

  $ maxvalue = ($ data ['any'] & Gt; 0? $ Site ['any']: $ site ['any']);   

I want to set the maximum value in the slider according to the above query, here is the code for the slider

   & Lt; Title & gt; JQuery UI Slider - Range with fixed maximum & lt; / Title & gt; & Lt; Link rel = "stylesheet" href = "http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> & Lt; Script src = "http://code.jquery.com/jquery-1.9.1.js" & gt; & Lt; / Script & gt; & Lt; Script src = "http://code.jquery.com/ui/1.10.3/jquery-ui.js" & gt; & Lt; / Script & gt; & Lt; Link rel = "stylesheet" href = "/ resources / demos / style.css" /> & Lt; Script & gt; $ (Function () {$ ("# slider-range-max"). Slider ({Category: "Max", Minimum: 10, Max: 60, Value: 10, Slide: Function (Event, UI) {$ ( "# Death") .val (ui.value);}}); $ ("#") .val ($ ("# slider-limit-max"). Slider ("value"));); & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; P & gt; & Lt; Label = "zodiac" & gt; Minimum number of bedrooms: & lt; / Label & gt; & Lt; Input type = "text" id = "zodiac" style = "border: 0; color: # f6931f; font-weight: bold;" / & Gt; & Lt; / P & gt; & Lt; Div id = "slider-range-max" & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;   

How can I do this? If there is any other slider code please post it.


Let me do this

  maximum: "  

How can I get the value of the slider after submitting?

Edit - no answer, ok I found the answer to myself, just change it

  & Lt; input type = "text" id = "zodiac" style = "border: 0; Color: # f6931f; Font-weight: bold; "/";   

   

Use of this

  $ maxvalue = any query; max: "& lt; ? Php echo $ max; & Gt; ",    

No comments:

Post a Comment