Loading ...
Sorry, an error occurred while loading the content.
 

how to set backgroundEnabled to false when initializing slider

Expand Messages
  • jsainzjr
    slider.backgroundEnabled = false; doesn t work. I could do it in the library but I plan to have other sliders that DO respond to clicks. Is this possible?
    Message 1 of 7 , Feb 27, 2009
      slider.backgroundEnabled = false; doesn't work. I could do it in the
      library but I plan to have other sliders that DO respond to clicks.

      Is this possible?

      Thanks in advance!
    • cjavajim
      ... Which version of YUI are you using? I ask because I went to this example (which is using 2.7.0)
      Message 2 of 7 , Feb 27, 2009
        --- In ydn-javascript@yahoogroups.com, "jsainzjr" <johnnysainz@...> wrote:
        >
        > slider.backgroundEnabled = false; doesn't work. I could do it in the
        > library but I plan to have other sliders that DO respond to clicks.
        >
        > Is this possible?
        >
        > Thanks in advance!
        >

        Which version of YUI are you using? I ask because I went to this
        example (which is using 2.7.0)

        http://developer.yahoo.com/yui/examples/slider/slider-simple_clean.html

        and added

        slider.backgroundEnabled = false;

        following

        Event.onDOMReady(function() {

        slider = YAHOO.widget.Slider.getVertSlider(bg,
        thumb, topConstraint, bottomConstraint);

        and it worked
      • jsainzjr
        I m using the current version (2.7.0) with the dual demo slider: YAHOO.util.Event.onDOMReady(function () { var demo_bg = Dom.get( demo_bg ), info =
        Message 3 of 7 , Feb 27, 2009
          I'm using the current version (2.7.0) with the dual demo slider:

          YAHOO.util.Event.onDOMReady(function () {
          var demo_bg = Dom.get("demo_bg"),
          info = Dom.get("demo_info"),
          from = Dom.get("demo_from"),
          to = Dom.get("demo_to");

          // Create the DualSlider
          var slider = YAHOO.widget.Slider.getHorizDualSlider(demo_bg,
          "demo_min_thumb", "demo_max_thumb",
          range, tickSize, initValues);

          //tried adding it here and no worky! :(
          slider.backgroundEnabled = false;


          when I change it in the lib it works fine. i'm lost.
        • cjavajim
          ... A DualSlider doesn t have that property; reference http://developer.yahoo.com/yui/docs/YAHOO.widget.DualSlider.html
          Message 4 of 7 , Feb 27, 2009
            --- In ydn-javascript@yahoogroups.com, "jsainzjr" <johnnysainz@...> wrote:
            >
            > I'm using the current version (2.7.0) with the dual demo slider:
            >
            > YAHOO.util.Event.onDOMReady(function () {
            > var demo_bg = Dom.get("demo_bg"),
            > info = Dom.get("demo_info"),
            > from = Dom.get("demo_from"),
            > to = Dom.get("demo_to");
            >
            > // Create the DualSlider
            > var slider = YAHOO.widget.Slider.getHorizDualSlider(demo_bg,
            > "demo_min_thumb", "demo_max_thumb",
            > range, tickSize, initValues);
            >
            > //tried adding it here and no worky! :(
            > slider.backgroundEnabled = false;
            >
            >
            > when I change it in the lib it works fine. i'm lost.
            >

            A DualSlider doesn't have that property; reference

            http://developer.yahoo.com/yui/docs/YAHOO.widget.DualSlider.html
          • jsainzjr
            ... thanks. I know it doesn t. Slider does. switching it to false in the lib still affects the dual slider so I was wondering if it s possible to set it from
            Message 5 of 7 , Feb 27, 2009
              --- In ydn-javascript@yahoogroups.com, "cjavajim" <cjavajim@...> wrote:
              >
              > --- In ydn-javascript@yahoogroups.com, "jsainzjr" <johnnysainz@> wrote:
              > >
              > > I'm using the current version (2.7.0) with the dual demo slider:
              > >
              > > YAHOO.util.Event.onDOMReady(function () {
              > > var demo_bg = Dom.get("demo_bg"),
              > > info = Dom.get("demo_info"),
              > > from = Dom.get("demo_from"),
              > > to = Dom.get("demo_to");
              > >
              > > // Create the DualSlider
              > > var slider = YAHOO.widget.Slider.getHorizDualSlider(demo_bg,
              > > "demo_min_thumb", "demo_max_thumb",
              > > range, tickSize, initValues);
              > >
              > > //tried adding it here and no worky! :(
              > > slider.backgroundEnabled = false;
              > >
              > >
              > > when I change it in the lib it works fine. i'm lost.
              > >
              >
              > A DualSlider doesn't have that property; reference
              >
              > http://developer.yahoo.com/yui/docs/YAHOO.widget.DualSlider.html
              >

              thanks. I know it doesn't. Slider does. switching it to false in the
              lib still affects the dual slider so I was wondering if it's possible
              to set it from your script somehow.
            • cjavajim
              ... Try adding this (these) slider.minSlider.backgroundEnabled = false; slider.maxSlider.backgroundEnabled = false; after: // Create the DualSlider var slider
              Message 6 of 7 , Feb 27, 2009
                --- In ydn-javascript@yahoogroups.com, "jsainzjr" <johnnysainz@...> wrote:
                >
                > --- In ydn-javascript@yahoogroups.com, "cjavajim" <cjavajim@> wrote:
                > >
                > > --- In ydn-javascript@yahoogroups.com, "jsainzjr" <johnnysainz@>
                wrote:
                > > >
                > > > I'm using the current version (2.7.0) with the dual demo slider:
                > > >
                > > > YAHOO.util.Event.onDOMReady(function () {
                > > > var demo_bg = Dom.get("demo_bg"),
                > > > info = Dom.get("demo_info"),
                > > > from = Dom.get("demo_from"),
                > > > to = Dom.get("demo_to");
                > > >
                > > > // Create the DualSlider
                > > > var slider = YAHOO.widget.Slider.getHorizDualSlider(demo_bg,
                > > > "demo_min_thumb", "demo_max_thumb",
                > > > range, tickSize, initValues);
                > > >
                > > > //tried adding it here and no worky! :(
                > > > slider.backgroundEnabled = false;
                > > >
                > > >
                > > > when I change it in the lib it works fine. i'm lost.
                > > >
                > >
                > > A DualSlider doesn't have that property; reference
                > >
                > > http://developer.yahoo.com/yui/docs/YAHOO.widget.DualSlider.html
                > >
                >
                > thanks. I know it doesn't. Slider does. switching it to false in the
                > lib still affects the dual slider so I was wondering if it's possible
                > to set it from your script somehow.
                >

                Try adding this (these)

                slider.minSlider.backgroundEnabled = false;
                slider.maxSlider.backgroundEnabled = false;

                after:

                // Create the DualSlider
                var slider = YAHOO.widget.Slider.getHorizDualSlider("demo_bg",
                "demo_min_thumb", "demo_max_thumb",
                range, tickSize);
              • jsainzjr
                ... YAHOO.widget.Slider.getHorizDualSlider(demo_bg, ... yesssss!!!! that works! thank you, cjavajim! :)
                Message 7 of 7 , Feb 27, 2009
                  --- In ydn-javascript@yahoogroups.com, "cjavajim" <cjavajim@...> wrote:
                  >
                  > --- In ydn-javascript@yahoogroups.com, "jsainzjr" <johnnysainz@> wrote:
                  > >
                  > > --- In ydn-javascript@yahoogroups.com, "cjavajim" <cjavajim@> wrote:
                  > > >
                  > > > --- In ydn-javascript@yahoogroups.com, "jsainzjr" <johnnysainz@>
                  > wrote:
                  > > > >
                  > > > > I'm using the current version (2.7.0) with the dual demo slider:
                  > > > >
                  > > > > YAHOO.util.Event.onDOMReady(function () {
                  > > > > var demo_bg = Dom.get("demo_bg"),
                  > > > > info = Dom.get("demo_info"),
                  > > > > from = Dom.get("demo_from"),
                  > > > > to = Dom.get("demo_to");
                  > > > >
                  > > > > // Create the DualSlider
                  > > > > var slider =
                  YAHOO.widget.Slider.getHorizDualSlider(demo_bg,
                  > > > > "demo_min_thumb", "demo_max_thumb",
                  > > > > range, tickSize, initValues);
                  > > > >
                  > > > > //tried adding it here and no worky! :(
                  > > > > slider.backgroundEnabled = false;
                  > > > >
                  > > > >
                  > > > > when I change it in the lib it works fine. i'm lost.
                  > > > >
                  > > >
                  > > > A DualSlider doesn't have that property; reference
                  > > >
                  > > > http://developer.yahoo.com/yui/docs/YAHOO.widget.DualSlider.html
                  > > >
                  > >
                  > > thanks. I know it doesn't. Slider does. switching it to false in the
                  > > lib still affects the dual slider so I was wondering if it's possible
                  > > to set it from your script somehow.
                  > >
                  >
                  > Try adding this (these)
                  >
                  > slider.minSlider.backgroundEnabled = false;
                  > slider.maxSlider.backgroundEnabled = false;
                  >
                  > after:
                  >
                  > // Create the DualSlider
                  > var slider = YAHOO.widget.Slider.getHorizDualSlider("demo_bg",
                  > "demo_min_thumb", "demo_max_thumb",
                  > range, tickSize);
                  >

                  yesssss!!!! that works! thank you, cjavajim! :)
                Your message has been successfully submitted and would be delivered to recipients shortly.