jquery-plugins

CoffeeScript and jQuery plugin authoring

那年仲夏 提交于 2019-12-25 01:44:31
问题 I have a habit of making questions unnecessarily long by including off-topic and useless rants. I'll try not to do it this time. I apologize for the lack of a better and more descriptive title. So, here's a CoffeeScript code. (($, window, document) -> # Conventionally 'private' variables _name = 'aPlugin' _defaults = property: 'value' _debug = (args) -> console.log args return # Plugin constructor Plugin = (element, options) -> @element = element @options = $.extend true, {}, _defaults,

uploadify with prettyPhoto : uncaught exception: Call to StartUpload failed

不想你离开。 提交于 2019-12-25 00:42:40
问题 We have been using uploadify for image upload and prettyPhoto for displaying images on lightbox in our Rails application. Both works well if used separately. Now we want to display uploadify control on lightbox just like dropbox uses but it start screaming if used with prettyPhoto. Here is sample html using uploadify with prettyPhoto. <!DOCTYPE html> <html> <head> <title>My Uploadify Implementation</title> <link rel="stylesheet" type="text/css" href="uploadify.css"> <link rel="stylesheet"

How to check input string with no spaces & special characters except two special charaters (that is & and Ñ)

拜拜、爱过 提交于 2019-12-24 21:37:59
问题 I am trying to validate an input string (which can be copied & pasted in the textbox). The input entered should contain one or more alphabetic characters , numbers and two more special characters as ( & and Ñ ), but no embedded spaces. NB: Alphabetic characters must present, but numbers & those two special characters may or may not present to create a valid input. I am using Jquery for client side validation. Alternative Approach: If anyone can help me how we can detect the occurrence of any

Two jQuery plugin conflicting on the same page

六眼飞鱼酱① 提交于 2019-12-24 20:18:37
问题 I have two jQuery Plugins working on the same file. One is jquery.autocomplete.js and the other is jquery.thumbnailScroller.js . The problem is when I am using both on same file, autocomplete is not working at all an thumbnailScroller is working and but the same is working well without thumbnailScroller plugin. Now, when I was browsing thru the js files, I got $.fn. in both files. But, I dont know is the problem because of this or anything else. I had searched in google and stackoverflow also

Angular - Is it possible to load a jquery plugin for one component?

点点圈 提交于 2019-12-24 19:43:26
问题 I've tried to do everything in angular and not use jQuery. Unfortunately, there's one component that requires it. However, I would like to only load the jQuery plugin .js file on that component (so it's not being loaded everywhere...) I have done the following npm install jquery --save npm install --save-dev @types/jquery Update Angular-cli.json > scripts > jQuery.min.js Questions Is it worth just loading the plugin in the index file? If not, how is it possible to load the plugin file on the

scrollTo and horizontal tables

醉酒当歌 提交于 2019-12-24 19:16:24
问题 I am attempting to make a horizontal scrolling portfolio site. I want to users to be able to click through the images using a next/previous button as well as scrolling as per usual with the mouse and scroll bars. I am, however, having trouble implementing this using jquery. The table is used as this is best practice in horizontal websites. I wish to use the scrollTo() plugin to allow the table to scroll forwards or backwards depending on which button is clicked. The end product would resemble

My jQuery plugin events not firing on multiple elements

允我心安 提交于 2019-12-24 18:55:23
问题 I wrote a jQuery plugin to filter select list options. It works great on one list, but not on more elements: http://jsfiddle.net/vgXPh/4/ $("select.filter").listFilter(); // doesn't work $("select.filter:first").listFilter(); // works I don't see any global variables that could be messing it up. Am I calling my bind events correctly? JSLint doesn't complain. What am I doing wrong? 回答1: You should probably surround your code with this.each() , like this: $.fn.listFilter = function() { this

How to import a jQuery plugin into a babel app

雨燕双飞 提交于 2019-12-24 18:23:04
问题 So I have a modern javascript app build using ES6 modules and transpiled by babel. In this app, I need to use a jQuery plugin for some DOM manipulations. I don't want to globally expose jQuery and then load the plugin code into the document using a script tag. Instead, I want the plugin to be available only inside a module: import $ from 'jquery'; // some magic importing pluginName $('#element').pluginName(); // how to make this work? Of course plugin is not a module and it needs the $

Stop an executing jquery and then resume where it left

允我心安 提交于 2019-12-24 18:00:53
问题 Well, I am using this jquery carousel plugin...and it works just fine (it has automatic carousel enabled), however I am trying to make it stop when any user runs a mouse over the carousel and then trying to resume where it left, after the mouse is out. I have not yet managed to do this, and I'm not even sure how to continue trying. This is my carousel code (since it's very long I'm just gonna place the first part, after all it repeats)... <div id="expertos" class="carrusel_expertos"> <ul> <li

jquery Datatable Row Grouping

ぃ、小莉子 提交于 2019-12-24 17:18:35
问题 I'm using jQuery DataTables (version 1.7.6). I'd like to group two consecutive rows so I can have an edit option for both rows. Here's my table: <table class="display" id="specificproduct_table" width="100%" cellpadding="0" cellspacing="0" border="0" > <thead> <tr> <th width="7%">column1</th> <th width="16%">column2</th> <th width="5%">Edit</th> </tr> </thead> <tbody> <tr> <td colspan="5" class="dataTables_empty"> Loading data from server </td> </tr> </tbody> <tfoot> <tr> <th>column1</th> <th