javascript - Cannot retrieve array data in js -
as name suggests cannot retrieve array data in js. code have var iconattribs = document.queryselectorall(icon);
var file = iconattribs[icns].getattribute("data-file"); $(document).on("dblclick", iconattribs,function() { new createframe(350,505,file,true,"application test!"); });
the problem code shows this:
file:anoscalculator/anoscalculator.html!
file:pacman/patrickman.html!
file:anosbrowser/anosbrowser.html!
whne console.log("file:"+file+"!");
. should when apply function createframe
parameters width,height,content_src , isresizable
.`
the var file
used fill in of content_src
. not work.what should load app specified app src based on data retrieves data-file attribute in 1 of .icon divs. each icon has different value. icon images work not files. icon calculator image should open calculator app becaouse of code: $(".tdata0").append("<div class = 'icon' data-file='anoscalculator/anoscalculator.html' data-iconfile='anoscalculator/calculator.png'></div>");
doesn't ideas?
the second param jquery.on
method should css selector (check http://api.jquery.com/on/). should have somthing this:
$(document).on("dblclick", 'your css selector here',function() { new createframe(350,505,file,true,"application test!"); });
Comments
Post a Comment