Tag: jquery plugins

在jQuery中使用CSS选择器数组

我正在尝试使用jQuery自动完成插件。 我有一系列ID,我想插件来处理。 所以,说我有: var aIds = [“1”, “2”]; 我在如何使用插件时看到的示例如下所示: $(‘#1’).autocomplete 有没有办法让我使用这个自动完成插件和我的数组? ID数组来自Web服务。 此外,自动完成插件会公开某些事件,例如select (请参阅: http : //docs.jquery.com/UI/Autocomplete#event-select )。 当发生这种情况时,我如何判断哪个元素触发了事件(如果我动态分配id数组)?

默认情况下选中JqGrid的Row

我想默认设置一个jqgrid的行,并对此事件做一些事情。 可能吗 ? 我正在使用asp.net(C#)和Json

带有jquery工具提示插件的多个HTML行

我正在使用插件http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/来创建带有JQuery的工具提示,但我无法创建包含3行(或更多行)HTML代码的工具提示。 我需要将下面显示的内容呈现为工具提示(显然,内容是动态生成的,这只是概念certificate) Line1 Line2 blah blah Line3 showBody属性似乎仅适用于标题属性。 发现了问题 显然jquery.html(“…”)需要一个根标记,否则会生成一个空字符串。 我原来的代码是 bodyHandler: function() { return $(“line1” + “line2”); } 需要使用JQuery删除的伪根标记编写 bodyHandler: function() { return $( “” + “line1” + “line2” + “” ); }

HoverIntent ClearTimeout

如何清除hoverIntent内置的超时? 我想从同一个hoverIntent的over部分内部进行。

jQuery表单文件上传大小超过4MB的文件

我正在使用jQuery表单上传。 我无法上传大小超过4MB的文件我在Fiddler中调试我的请求并且它说ReadResponse() failed: The server did not return a response for this request. 如果我上传的小文件都运行良好,我没有收到任何错误。 您可以在此处查看我的代码: jQuery表单文件上载检查文件在服务器上并生成错误以传递给客户端 任何想法如何解决? 有什么想法为什么会发生? 另外我想我会在客户端上添加一些代码,在服务器上提交之前检查文件大小。

为jquery插件实例创建唯一的id?

我创建了一个jQuery插件,它监听窗口的模糊事件。 我想在插件本身内部创建一个唯一的id,这样我就可以在销毁插件实例时关闭侦听器。 我该如何创建这些uniqueIds? 下面的示例显然不起作用 – destroy方法中的incrementId总是从上一个插件实例中删除模糊。 (function( $ ) { var incrementId = 0; var methods = { init : function( options ) { var that = this; incrementId += 1; $(window).on( “blur.pleaseKillMe” + incrementId, function( e ) { that.css( “color”, “red” ); }); }, destroy : function( ) { console.log( “and… ” + incrementId […]

将AOS库与Angular4应用程序集成

我正在研究Angular 4.4.6应用程序,我想在使用awesome插件AOS滚动时实现一些动画 我的代码: app.component.ts import * as AOS from ‘aos’; @Component({ selector: ‘app-root’, templateUrl: ‘./app.component.html’, styleUrls: [‘./app.component.scss’], encapsulation:ViewEncapsulation.None }) export class AppComponent implements OnInit { ngOnInit(){ AOS.init(); } } app.component.html angulr.cli.json “styles”: [ “../node_modules/aos/dist/aos.css”, “../node_modules/animate.css/animate.min.css”, “styles.scss” ], “scripts”: [ “../node_modules/jquery/dist/jquery.js”, “../node_modules/aos/dist/aos.js” ], 我在这里尝试了答案,没有希望https://stackoverflow.com/a/44808496/4183947 注意:我的控制台中没有错误。

dataTables生成多个服务器端请求

我正在使用dataTable jquery插件启用服务器端处理。 使用fnReloadAjax函数时,隐藏处理div和显示新数据之间会有2-3秒的延迟。 这是关于这个问题的post 。 我发现这是由于datatable发出的多个服务器请求。 在我的页面onchange事件中,一组单选按钮正在向服务器调用新数据,如下所示 oTable.fnReloadAjax(“getCaseList?caseStatus=xxx&showValidOnly=true”); 在firebug控制台中,我看到两个请求一个接一个地发出 GET https://localhost/getCaseList?caseStatus=xxx&showValidOnly=true&_=1363611652185 GET https://localhost/getCaseList?caseStatus=xxx&showValidOnly=true&sEcho=4&iColumns=9&sColumns=&iDisplayStart=0&iDisplayLength=100&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&sSearch_5=&bRegex_5=false&bSearchable_5=true&sSearch_6=&bRegex_6=false&bSearchable_6=true&sSearch_7=&bRegex_7=false&bSearchable_7=true&sSearch_8=&bRegex_8=false&bSearchable_8=true&iSortingCols=1&iSortCol_0=4&sSortDir_0=desc&bSortable_0=false&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&bSortable_5=true&bSortable_6=true&bSortable_7=true&bSortable_8=true&_=1363611701804 处理div在第一个请求完成后被隐藏,但只有在第二个请求完成后才加载新数据。 为什么数据表可以进行第二次额外通话?

用于执行日期操作的jQuery插件

我正在寻找一个让我做日期操作的jQuery实用程序。 例如:1)添加x号。 几天到一个约会并得到一个新的日期。 2)给定一个日期,给出一年中相应的一周3)找不到。 两个日期之间的天数4)找不到。 两个日期之间的周数5)找不到。 两个日期之间的月份 是否有一个内置这些通用函数的jQuery插件? (我不是在寻找任何UI插件) 谢谢。

replaceWith和jQuery draggable drop?

我想知道为什么 $(‘#title’).replaceWith(‘ha’); 将在外面工作 drop: function(event, ui) {} jquery的droppable脚本中的区域,但它不能在里面工作。 具体来说,如果我这样做 $(“.droppable”).droppable({ drop: function(event, ui) { $(‘#title’).replaceWith(‘ha’); } 我得到一个Runtime Error (line 1102) data(…).options is null or not an object 。 如果我插入$(‘#title’).append(‘ha’); 在drop:里面,它有效。 但是如果我把$(‘#title’).replaceWith(‘ha’); 外面的任何地方 $(“.droppable”).droppable({ /* */ }); 有用?