jquery-plugins

jquery validation of textarea integrated with ckeditor

我的梦境 提交于 2019-12-18 13:26:56
问题 I have a text-area <td><textarea id="event-body" name="body"> <p class="error"></p> That is integrated with CKEDITOR CKEDITOR.replace("event-body") And jquery validate plugin. And the code is like this $('#event').validate({ rules:{ name:{ required: true }, }, messages:{ body:{ required: "event body is required" } }, errorPlacement: function(error, element){ $(element).each(function (){ $(this).parent('td').find('p.error').html(error); }) }); The code works just fine but when I type into my

jQuery plugin to apply also on dynamically created elements

非 Y 不嫁゛ 提交于 2019-12-18 13:05:09
问题 I'm writing a jquery plugin that should handle extra information on links to specify open behavior. For example, I want to supports markup like : <a href="somewhere" data-openmode="NewWindow" class="openmode" /> <a href="somewhere" data-openmode="Modal" class="openmode" /> <a href="somewhere" class="openmode" /> <!-- Not specified --> The first should open in a new window, the second in a modal dialog, the third should open with the native behavior (whatever target has been set on the tag). I

Current state of Jquery history/back-button plugins?

痞子三分冷 提交于 2019-12-18 12:44:30
问题 I spent a long time looking into this about a year ago, I tried: Jquery BBQ plugin Jquery History plugin jquery .address plugin I found the jquery.address plugin to be the best, but these things change quickly. Has anyone thoroughly researched the options for this RECENTLY? Keen to hear some thoughts before I integrate jquery.address again (I didn't have any issues with it before) 回答1: Hey Guys, I'm the author of History.js which as SnippetSpace has said in his answer works with the HTML5

jQuery fn.extend ({bla: function(){}} vs. jQuery.fn.bla

拟墨画扇 提交于 2019-12-18 12:14:41
问题 OK I think I get Difference between jQuery.extend and jQuery.fn.extend? in that the general extend can extend any object, and that fn.extend is for plugin functions that can be invoked straight off the jquery object with some internal jquery voodoo. So it appears one would invoke them differently. If you use general extend to extend object obj by adding function y, then the method would attach to that object, obj.y() but if you use fn.extend then they are attach straight to the jquery object

Multiple background images IE8

╄→尐↘猪︶ㄣ 提交于 2019-12-18 11:56:34
问题 Is there any jquery plugin (or any other way) to force IE8 to show multiple background images? 回答1: CSS3 Multiple Backgrounds for Internet Explorer and legacy Mozilla Firefox This library brings support for multiple background images to Internet Explorer 6-8 and Firefox <=3.5 by reading the CSS code from style and link tags. CSS3 browser support extends to background-image, background-position, background-repeat. This library only implements its own property for the shorthand style background

How to add new methods to the jQuery object?

时光毁灭记忆、已成空白 提交于 2019-12-18 11:47:35
问题 Is there some way to add methods to jQuery's objects? For example, I have jQuery object a = $('div') I'd like that every object which was assigned like that, would have particular method ( doSomething() ) so I could invoke it like a = $('.foo') a.doSomething() b = $('.bar') b.doSomething() 回答1: You have to add your function to the $.fn namespace. Please note that inside the function, this will refer to the jQuery object, not a DOM object. $.fn.doSomething = function () { this.css('color',

Using jQuery validate plugin: onfocusout, onkeyup notworking as expected on production site

白昼怎懂夜的黑 提交于 2019-12-18 11:47:33
问题 I am using jQuery Validate plugin v.1.9.0 it works very nicely. But I am facing this issue, once the user submits the form & if there are any errors, it correctly display error message. The problem is that it does not update the message if the user takes an action to remedy that error. E.g. if a field is required, upon getting the message the first time, user starts typing, then that message should go away. In the docs it mentions that onfocusout & onkeyup are used for this purpose & by

Where is the documentation for the “jQuery.event.special” API (for custom events)?

走远了吗. 提交于 2019-12-18 10:54:53
问题 I'm creating a fork of the textchange jQuery plugin, which uses the jQuery.event.special API to create its own custom events ( textchange , hastext , and notext ). I'm going crazy trying to find the documentation for the $.event.special API! I've searched jQuery's site and found nothing that mentions the special functionality. I've found several blogs that talk about API and even reference a link to it, but that page does not talk about it at all. Can someone please point me toward some

jquery form plugin, no error handling

ぃ、小莉子 提交于 2019-12-18 10:44:27
问题 It seems that there are no error handling facility in the Jquery.Form plugin, which is very frustrating. Even though the documentation says we can use the $.ajax options, I still cannot make use of the 'error' option when the server returns an error, especially the 500 and 400 series. Is it that this plugin cannot handle any error at all from the server or is it a bug, etc? Can someone please tell me how I can handle errors (400, 500, etc) with this plugin? I need your help... All I want is a

JQuery UI Slider for time

£可爱£侵袭症+ 提交于 2019-12-18 10:37:28
问题 Hi I need to implement a slider for 24 hour time range . I like to use jquery ui slider for this . I have written below code <script type="text/javascript"> $(function() { $(".slider-range").slider({ range: true, min: 0, max: 23.59, step: 0.15 }); }); </script> I like the range is like 01:00----01:59 How i gave the colon(:) instead of dot(.) . Also the range waas gone beyond 59 like 05:85 . Please help me to create a time slider 回答1: Do not use hours as a unit, use minutes instead. Then apply