0

I'm using this plugin in my project :

https://github.com/bseth99/jquery-ui-extensions

https://raw.github.com/bseth99/jquery-ui-extensions/master/bseth99-jquery-ui.js

Manager choose this plugin based on some criteria. Basic idea behind this is demonstrated in the example :

http://bseth99.github.com/jquery-ui-extensions/tests/visual/slidespinner/value.html

So user slides right left and the value changes. The issue I currently have with this plugin is that it doesn't fire any kind of change event, when I slide the slider in any direction.

But it works properly, the value in the input changes. But if I try :

$(document).on("input", "change", function(){
     alert("something");
});

Naturally it doesn't fire. So my question is, what would be next thing to try? Can I create some kind of observer that fires when this value is changed on document ready or something else?

Gandalf StormCrow
  • 25,788
  • 70
  • 174
  • 263

2 Answers2

1

try something like this in jQuery:

$(document).ready(function(){
    $('input').change(function(){
        alert('My value was changed !');
    });
});
Amyth
  • 32,527
  • 26
  • 93
  • 135
  • thank you for your response Amyth but I've already tried this if you read my question. This will work for the case when user manually types in the input field, for my example that is not the case and not really relevant. – Gandalf StormCrow Dec 25 '12 at 16:22
0

Have you seen that actually the attribute "style" in the a-anchor is changing in your plugin? You should try to catch this element when observing change-events.

<a class="ui-slider-handle ui-state-default ui-corner-all" href="#" style="bottom: 58.5%;"></a>
Javali
  • 535
  • 4
  • 14
  • try this (guess you have to create a custom event for that): http://stackoverflow.com/questions/2157963/is-it-possible-to-listen-to-a-style-change-event – Javali Dec 25 '12 at 17:09