草庐IT

specify-an-init-process

全部标签

javascript - 错误 : Task x can't support dependencies that is not an array of strings

我正在关注thistutorial如何开始使用gulp和browserify(以及其他插件)。结构如下:.├──gulpfile.js└──gulp  ├──index.js  └──tasks  ├──browserify.js  └──minifyCss.js/*gulpfile.js*/vargulp=require('./gulp')(['minifyCss','browserify']);gulp.task('default',['minifyCss','browserify']);/*index.js*/vargulp=require('gulp');module.expo

javascript - Foundation 6 - 控制台警告 : Tried to initialize magellan (any JS plugin) on an element that already has a Foundation plugin

我使用bower安装了Foundation6。每次我使用任何Foundation6-JavaScriptbasedplugin时,我都会在控制台中收到多个warning。确切的警告:TriedtoinitializemagellanonanelementthatalreadyhasaFoundationplugin.我的脚本包括如下所示:$(document).foundation();该警告由foundation.js中180行的以下代码触发://Foreachpluginfound,initializeit$elem.each(function(){var$el=$(this),o

javascript - 命中 FB.init 返回错误 "Polyfill JSON does not have implementation of stringify"

昨天,我没有遇到这个问题。我不相信我的任何代码从那时起就以任何方式发生了变化。我得到“PolyfillJSON没有实现stringify”。FBLogin.js的第46行是FB.init。window.fbAsyncInit=function(){FB.init({appId:'##########',//thisisreplacedwithmyappIdcookie:true,xfbml:true,version:'v2.5'});};(function(d,s,id){varjs,fjs=d.getElementsByTagName(s)[0];if(d.getElementByI

javascript - 删除 :active pseudo-class from an element

我希望能够告诉一个元素它不再是:active以便CSS规则不再适用。有没有办法在JavaScript中做到这一点? 最佳答案 可能的解决方案:1)使用类:JS:document.getElementById("element").classList.remove("hasactive");CSS:#element.hasactive:active{background:blue;}2)阻止默认的mousedown功能(事件状态):编辑:显然,这只适用于Firefox。JS:document.getElementById("eleme

javascript - 什么是 `process.binding(' fs' )` in ` fs.js`?

这个问题在这里已经有了答案:Nodejs:Whatdoes`process.binding`mean?(3个答案)关闭6年前。我看到在fs.js的顶部有一个process.binding('fs')。https://github.com/nodejs/node/blob/master/lib/fs.js#L10:constbinding=process.binding('fs');然后,它被用作:binding.open(pathModule._makeLong(path),stringToFlags(flag),0o666,req);(在https://github.com/node

javascript - jQuery 文件上传插件 : trigger an event when all files are uploaded

我使用jQuery文件上传插件(http://blueimp.github.io/jQuery-File-Upload/)来管理我的文件上传。它工作得很好。我可以检测到每个文件何时上传并(例如)显示一条消息。但我想检测每个文件何时上传以显示最终消息。如何做这样的事情?下面是我的实际实现:$('#fileupload').fileupload({url:"api/fileManager",dataType:'json',maxFileSize:100000000,//100MBfortesting!dropZone:$(document.body)}).on('fileuploadcha

javascript - Dropzone.js init function() 未被调用

我有这个HTML:RemoveAll和$(document).ready(function(){}中的这个Javascriptwindow.Dropzone;Dropzone.autoDiscover=false;$('#fbDropZone').dropzone={init:function(){fbDropZone=this;$("#removeAllImages").click(function(){fbDropZone.removeAllFiles();})},paramName:"file",maxFilesize:5,maxFiles:1,autoProcessQueue:

javascript - processing.js 如何检测浏览器的大小?

如前所述,processing.js如何响应浏览器的大小?(响应式设计)我试过screen.width和screen.height但效果不佳。好像只能检测电脑屏幕的大小。此外,我想在拖动和更改浏览器大小时跟上窗口的大小 最佳答案 size(window.innerWidth,window.innerHeight);根据https://groups.google.com/forum/?fromgroups=#!topic/processingjs/2-U_P7_BHlY或voidsetup(){size($(window).width

javascript - 为什么这不是 google.maps.Map 的 map 实例?无效值错误 : setMap: not an instance of Map;

我收到错误Assertionfailed:InvalidValueError:setMap:notaninstanceofMap;而不是谷歌地图网页上StreetViewPanorama的实例。然后我读了thisquestionStackOverflow上的其他地方告诉我我需要一个google.maps.MAP对象的实例。我认为通过调用该对象来初始化我将调用该对象的map。以前,我收到错误iisnotdefined所以我将createMarker函数移动到$.getJSON函数中,它有本地范围。我需要在其他地方调用google.mapsMap吗?我做错了什么?HTML:HelloWor

javascript - Photoshop 脚本 : Move an image to position x, y

我有一个事件的ArtLayer被变量NewLayer引用,我想移动到Canvas中的绝对位置x,y。我已经用谷歌搜索了几个小时,但没有任何结果。有人可以举个例子吗?//谢谢。 最佳答案 经过更多API阅读和搜索后,我得出的结论是只能使用增量移动来移动图层。我编写了这个小函数来将图层定位在绝对位置。希望这对下一个有同样问题的读者有所帮助...//******************************************//MOVELAYERTO//Author:MaxKielland////MoveslayerfLayert