0
我有以下代码。JQuery替换var值
var fancyProductDesigner = jQuery('#fancy-product-designer-310938')
.fancyProductDesigner({
uploadDesigns: 0,
customTexts: 1,
imageDownloadable: 1,
saveAsPdf: 0,
printable: 1,
dimensions: {
sidebarNavSize: 30,
sidebarContentWidth: 168,
sidebarSize: 887,
productStageWidth: 490,
productStageHeight: 490
}
}).data('fancy-product-designer');
我想改变宽度和高度。位置(尺寸:)与用户输入的尺寸。
我需要知道如何设置/更改这些值。
我已经试着看看对象是否存在。
alert(typeof $('fancy-product-designer').data('dimensions'));
但它说未定义....
我的页面是http://www.panel-it.eu/shop/ontwerp-sticker-effe-kleuren/#
并按下黄色栏时出现的元素。
我登录
console.log(jQuery('#fancy-product-designer-310938').data('fancy-product-designer'));
但无法找到一个方法来重置尺寸。
我注意到:setStageDimensions
能有人帮助我一起去吗?
呃,我刚刚检查了你的panel-it.eu网站,而JQuery实际上并没有定义......你是否记得包含该文件? – 2014-10-31 13:00:01
@DylanCorriveau jQuery是在那里定义的。使用'jQuery'而不是'$'。 – 2014-10-31 13:04:43
我不知道fancyProductDesigner并没有很快找到文档,但是您确定,数据函数设置了您之前定义的属性吗? – 2014-10-31 13:16:09