jquery-plugins

select multiple files to upload in ASP.NET (preferably without flash)

梦想与她 提交于 2019-12-30 11:34:05
问题 is there a solution that allows to select multiple files from the file open dialog box and upload them from ASP.NET web page? I have gone through previous posts related to this, but wondering if it is possible to select multiple files for upload without using the technologies like flash or silverlight? thanks in advance. UPDATE: to be clear, I need to select multiple files in a folder in the dialog box at once, by pressing shift or control key. the flash upload controls allow this, but I am

How the jquery Datepicker set some date to highlight?

六月ゝ 毕业季﹏ 提交于 2019-12-30 11:32:09
问题 I'm use jquery Datepicker [link:http://docs.jquery.com/UI/Datepicker] now,and if I want Set some date to highlight, not just highlight the date now, how can I set the option? For example: There I want 24/09/2011, 25/09/2011 and 27/09/2011 to highlight. 回答1: You'll have to use the beforeShowDay option: var dates = []; // array of the dates you want to highlight, stored as strings $('selector').datepicker({ beforeShowDay: function(date) { if ($.inArray(date.toString(), dates) != -1) { return

Add function to existing JQuery plugin

只谈情不闲聊 提交于 2019-12-30 10:13:06
问题 Is it possible to add a function to a plugin without modifying the actual plugin? Can I do something like this in my site's js file? $.fn.Watermark.Refresh = function() { $.Watermark.HideAll(); $.Watermark.ShowAll(); } or (function($){ $.fn.Watermark.Refresh = function() { $.Watermark.HideAll(); $.Watermark.ShowAll(); }; })(jQuery); neither worked, the first says $ is undefined, the second that jQuery is undefined... ideas? Solution: Either method works, just include the jquery file before

jQuery Handler error is not a function

蓝咒 提交于 2019-12-30 08:33:12
问题 I am using jquery ajax fileupload. the file is uploaded correctkly but i got error like TypeError: jQuery.handleError is not a function [Break On This Error] jQuery.handleError(s, xml, status, e); using jQuery version 1.7.2 and the code is jQuery.ajaxFileUpload ( { url:'<?php echo $currenturl.'&fileupload=enable';?>', secureuri:false, fileElementId:'fileToUpload', dataType: 'json', data:{'image_desc':image_desc,'gallery_id':curr_time_stamp}, success: function (data, status) { if(typeof(data

jQuery hotkeys: prevent IE from running its own shortcuts, like Alt+H

血红的双手。 提交于 2019-12-30 07:33:11
问题 Using jQuery hotkeys, I try to bind shortcuts like Alt + H , Alt + C to some specific actions in my site. The event propagation stops (as it should) in all browsers but IE. First of all, is it possible to achieve this? If so, how? Here is a code sample: jQuery(document).bind('keydown', 'Alt+H', function (event) { $this.toggleMenu( 'H' ); if(jQuery.browser.msie) { event.cancelBubble = true; } else { event.stopPropagation(); } return false; } ); In IE, the line $this.toggleMenu( 'H' ); gets

back and forward buttons to control ajax loads

跟風遠走 提交于 2019-12-30 07:16:07
问题 hallo together, i am searching for a solution, where the back and forward buttons control my ajax-call history. so if i maka a ajax call, and then press "back" i want to reload the original page. if i do a ajax call and then another, and then press the back button i want to do the first ajax call again. and so on ... (i.e. if i now would press the forward button, the second ajax coll shell be redone ;-) ) thanks UPDATE well, i resolved the whole thing with a very nice jquery plug in named

jCarousel: Can you remove all items and rebind to a new collection?

夙愿已清 提交于 2019-12-30 06:27:29
问题 jCarousel documentation states the following: By passing the callback function itemLoadCallback as configuration option, you are able to dynamically create (li) items for the content. {...} jCarousel contains a convenience method add() that can be passed the index of the item to create and the innerHTML string of the item to be created. My Question: Is it possible to remove all items and rebind to a new collection? BTW: I don't necessarily need a "convenience method" to do this. I'm very open

how to unit-test private methods in jquery plugins?

半世苍凉 提交于 2019-12-30 05:55:49
问题 Perhaps this is a bit of a novice JQuery question but: proper jquery plugins are written inside a closure thus only methods defining the plugin interface are accessible from the outside sometimes (or many times) one may need helper methods that it doesn't make sense to expose as part of plugin interface (for example because they alter internal state). how do those get unit-tested? For example, looking at blockUI plugin, how can methods install, remove, reset get unit-tested? To draw a

jquery validation only digits

南楼画角 提交于 2019-12-30 02:48:09
问题 I am having the jquery.validate.js plugin and it is working fine for me. My question is : I am having a textbox and this textbox is mandatory and should only accept digits. In the js, I can see that there is validation for the digits and the problem is that I do not know how to use it. I only knew how to make the field required by putting in the textbox field <class="required"> So, how can I add one more validation criteria to accept only digits. Thanx 回答1: to check it add $("#myform")

jQuery Context Menu clashes with jQuery Draggable

我们两清 提交于 2019-12-29 07:53:09
问题 I'm trying the jQuery Context Menu with jQuery Draggable rows in a jQGrid. The problem I'm having is that since I added the jQuery Context Menu the draggable action is triggered on single click (as well as the normal drag). It looks a little weird when I rightclick a row to get the menu, and then click outside it on another row (to discard the menu) and that row starts following the cursor. Does it have to do with the evt.stopPropagation(); in the following snippet from jQuery Context Menu? $