Ciao Paul,
I had the same problem and modified the code as per your suggestion to
prevent the callback but it is still called.
The code reads:
$("#sprice_slider").slider({
min: 0, max: 25, range: true,
change: function(e, ui) {
$("#btnprice_slider").click(); // this is to call a code
behind method
}
});
$("#sprice_slider").slider("moveTo", 13, 1, false);
I put a breakpoint to check the if the method in code behind is called
and it is :(
Any idea?
Or maybe there's a workaround: is it possible to add the change
function later (after the moveto) or just when the slider is created?
moveto is the only way to set the initial value of the slider/hand?
Thanks a lot!
Pietro
On 14 Ott, 11:08, "Paul Bakaus" <[EMAIL PROTECTED]> wrote:
> Hi Chris,
>
> the answer to the first question is easy - the third argument to the method
> defines wether callbacks are being fired or not.
>
> So, simply calling $().slider("moveTo", value, null, false) should do the
> job.
>
> The other question I think I don't understand correctly - is there a demo
> page
> I could check out to see what you mean?
>
> Thanks,
> Paul
>
>
>
>
>
> On Tue, Oct 7, 2008 at 10:54 PM, sparkyc <[EMAIL PROTECTED]> wrote:
>
> > I'm fairly familiar with jquery, but relatively new to ui. I've been
> > experimenting with sliders, and have a couple of questions which I'm
> > hoping the community might be able to help me with:
>
> > First - Is it possible to suppress the callback function when the
> > slider is moved using the slider("moveTo", val) method? According to
> > the wiki <http://docs.jquery.com/UI/Slider/slider#.22moveTo.
> > 22valueindex<http://docs.jquery.com/UI/Slider/slider#.22moveTo.22valueindex>>
> > there seems to be no way to do it. I've found some
> > discussion previously about sliderMoveTo(), which did allow the
> > callback to be suppressed, but that was fairly old, so may not apply
> > anymore.
>
> > The second question - I've found that if the slider position is
> > constantly updated (to display the position in an animation, say), the
> > ability to use select elements is lost, as something seems to keep
> > stealing the focus from them and closing the menu. Is this expected
> > behaviour?
>
> > Thanks in advance,
>
> > Chris
>
> --
> Paul Bakaus
> UI Architect
> --http://paulbakaus.comhttp://www.linkedin.com/in/paulbakaus- Nascondi testo
> citato
>
> - Mostra testo citato -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---