jQuery mobile, range slider and slidestop event

jQuery mobile, range slider and slidestop event

Good day,

I was trying for a while to get the slidestop event to fire with HTML code like so:

  1.     <label for="tempslider">Temperature</label>
  2.     <input type="range" name="tempslider" id="tempslider" value="95" min="90" max="135" />

and JS like:

  1.     $("#tempslider").on("slidestop", function(event) {console.log("temp value stop at " + $(this).val() );});
But it simply would not fire. Finally I found a sample code snippet that used a variation of 'on' which attached to a parent object, like so:

  1.                 <div data-role="fieldcontain" id="warmtemp">
  2.                     <label for="tempslider">Temperature</label>
  3.                     <input type="range" name="tempslider" id="tempslider" value="95" min="90" max="135" />
  4.                 </div>
And then used JS like so:

  1.         $("#warmtemp").on("slidestop", "#tempslider", function(event) {console.log("temp value stop at "+$(this).val());});
And this worked great! 

So, the question: do we expect the former method to work? I have seen samples on jsfiddle which show it working, but I was unable to get it working in my jQuery mobile (iOS) application. In any case, I can now move forward but thought others might be able to learn from my experience.

Thank you,

Tyler