Closed thepixelmonk closed 11 years ago
I think obj is being set to undefined here: obj = $(this).data("slider-object")
(line 308)
Yeah something's going wonky with this: $(this).data "slider-object", new SimpleSlider($(this), settings)
Are you using Jquery or zepto? If zepto - make sure you include data.js
Greg
Sent from my iPhone
On Jan 26, 2013, at 3:49 AM, Chris Bolton notifications@github.com wrote:
Yeah something's going wonky with this: $(this).data "slider-object", new SimpleSlider($(this), settings)
— Reply to this email directly or view it on GitHub.
Using jQuery, and .data seems to be working in general. If I insert $(this).data 'foo', 'bar'
above that line it saves that info.. just doesn't save new SimpleSlider
Is happend to me, i tod i was including wrong the function:
$("#my-input").simpleSlider("setValue", 50);
But then i found this, maybe it could be the same problem.
Any suggestions?
Same issue here =(
..using jquery
Dom was not fully loaded - jQuery(document).ready(function($)... etc fixed it
I was facing this issue and I did as below.
I replaced document.addEventListener('DOMContentLoaded', function () {})
with
$( document ).ready(function() {})
and it started working fine.
Thanks for the clue.
when running
data.el.simpleSlider('setRatio', 1)
inside the ready callback, I get:Uncaught TypeError: Cannot read property 'setRatio' of undefined