Reputation:
I download one code from dropbox .When i run my code it work.I run "simple.html" Here is link https://www.dropbox.com/sh/a4mrvmft99u0kr7/Dj44R-fqNy
and check all my code on fiddle .It will not work fine as in browser..why ? 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);
});
});
Upvotes: 0
Views: 75
Reputation: 25594
Here lies your problem:
http://jsfiddle.net/SimplyAzuma/v4d2s/1/
jQuery 1.8.3, 1.7.2, and 1.6.4 will work.
Use an older version of jQuery and it will work perfectly fine.
You are also not seeing images because your css references "images/image.png". To JSFiddle, there is no image folder. Change these to "image.png" and it should work.
Upvotes: 2