Open exteon opened 11 years ago
Can you provide some more sample code so that I can reproduce and determine the cause?
I have a hard time creating a minimal testcase, but the "point" is that you are using selectors like: $('#0.43256756') which is ambiguous because it can mean element with id 0, class 43256756 or element with id 0.43256756 I cannot reproduce it though on your example page, but in a more complex setup JQuery does blow up at that selector. Maybe the jquery is to blame, but anyway, removing the dot in the autogenerated id should be a really quick workaround.
Wait, I got it: crashes in youtubeplayer like this: change the following in index.html
<script type="text/javascript">
$(function() {
$(".osmplayer",$('body')[0]).osmplayer({
width: '100%',
height: '650px',
file:'http://www.youtube.com/watch?v=7MqrBauptrE'
});
});
</script>
</head>
<body>
<div class="osmplayer"></div>
"Error: An invalid or illegal string was specified.
at Function.Sizzle (https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js:3983:50)
at jQuery.fn.extend.find (https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js:5576:11)
at jQuery.fn.jQuery.init (https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js:196:38)
at jQuery (https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js:62:10)
at null.<anonymous> (file:///D:/Temp/osmplayer-2.x/bin/osmplayer.js:5512:19)
at callLater (file:///D:/Temp/osmplayer-2.x/bin/osmplayer.js:1619:20)"
selector="#0.895523163722828-player"
(Excerpt from Chrome 26.0.1410.64 m), also reproducible on FF 19.0.2 and IE 10.
I just did this and it works fine for me... but I am also using an older version of jQuery. Have you tried it with version 1.8.3 of jQuery?
No, I tried with the index.html provided with osmplayer (1.7), up to 1.9.1. Just tried with 1.8.3 and it fails just as miserably. To reproduce:
Eg.
Because the auto-generated ID is no longer valid by jquery standards, it throws a sytax error exception on "#0.53456353" selector