为什么fiddle代码在dropbox上运行不一样
why the fiddle code is not run as same on dropbox?
我从dropbox下载了一个代码。当我运行我的代码时,它就工作了。我运行"simple.html"这是链接https://www.dropbox.com/sh/a4mrvmft99u0kr7/Dj44R-fqNy
并检查我在fiddle上的所有代码。它不会像在浏览器中那样正常工作。。为什么??http://jsfiddle.net/v4d2s/
$(document).ready(function(){
$("#browser").treeview({
toggle: function(e) {
alert($(this).find('ul').closest.id);
//alert('===='+this.attr('id'));
console.log("%s was toggled.", $(this).find(">span").text());
}
});
$("#add").click(function() {
var branches = $("<li><span class='folder'>New Sublist</span><ul>" +
"<li><span class='file'>Item1</span></li>" +
"<li><span class='file'>Item2</span></li></ul></li>").appendTo("#browser");
$("#browser").treeview({
add: branches
});
});
/*$("#swipe").click(function() {
alert('--')
var effect = 'slide';
// Set the options for the effect type chosen
var options = { direction: 'right' };
// Set the duration (default: 400 milliseconds)
var duration = 700;
// $('#test').show();
$("#test").animate({left:'250px'});
//$('#test').toggle(effect, options, duration);
});*/
$('#swipe').toggle(
function(){
$('#test').animate({
position:'absolute',
left:'50px',
border:'1px solid black'
}, 1500);
},
function(){
$('#test').animate({
position:'absolute',
left:'-250px',
}, 1500);
});
});
您的问题在于:
http://jsfiddle.net/SimplyAzuma/v4d2s/1/
jQuery 1.8.3, 1.7.2, and 1.6.4 will work.
使用旧版本的jQuery,它会非常好地工作。
你也看不到图像,因为你的css引用了"images/image.png"。对于JSFiddle,没有图像文件夹。将这些更改为"image.png",它应该可以工作。
相关文章:
- Grunt手表在纠错后运行不减少
- 为什么'这两根绳子不一样吗
- jQuery的工作方式不一样
- 使用条件函数的Jquery ReplaceWith()的行为与我预期的不一样
- 为什么两个“这个”不一样
- Dojo 1.7 伪选择器运行不佳
- Function.length和this.length不一样.为什么
- node.js在端口8080上运行不正常
- HTML Javascript-setInterval运行不正常
- 电子邮件验证功能运行不正常
- 使用 pjax 时幻灯片放映运行不佳
- IE DIV悬停区域不一样.直到我添加背景颜色
- 如何在服务器端运行不受信任的代码
- i-- 和 i = i-1 的评估不一样
- jQuery运行不佳
- Javascript代码在IE9上运行不佳
- 脚本运行不正确的功能
- jquery测试函数运行不正常
- 客户端上用于运行不受信任代码的JavaScript eval()
- 为什么fiddle代码在dropbox上运行不一样