jquery-plugins

Crockford Prototypical Inheritance… no prototype chain? No super?

青春壹個敷衍的年華 提交于 2019-12-21 02:45:13
问题 Trying to understand a little more about Crockford's approach to Prototypical Inheritance whereby he essentially eliminates the constructor, thus eliminating any real possibility for a prototype chain or leveraging the idea of "super". mynamespace.object.create = function( o ) { function F(){}; F.prototype = o; return new F(); }; Is that intentional based on the theory behind prototypical? The reason I ran into this is I wanted to create a base class with an init method that did some common

DataTables.js Sort columns containing HTML links with integer text

◇◆丶佛笑我妖孽 提交于 2019-12-21 02:44:11
问题 I'm trying to sort columns in DataTables.js that contain HTML anchor tags. The text within the anchor tag is an integer, like <a href="#">123</a> . I want to sort the columns numerically. In the documentation examples, there is DataTables HTML sorting auto-detection example. I tried this but it doesn't solve my issue - it does correctly parse the text out of the HTML, however, it treats the resulting text as a string and not an integer. Example output: 0, 0, 1, 14, 67, 67, 7 Desired output: 0

Write a jQuery Plugin that return values

痞子三分冷 提交于 2019-12-21 02:44:05
问题 I'm writing a jQuery plugin that stores some data in some cases. I'd like to write it in a very flexible way, where I'll can change an input parameter to obtain some value that were stored by the plugin. Explanation: When I call $("#any").myPlugin() , my plugin initializes creating a div and some a inside. Clicking on an a will store it .index() using the .data() method. If I call $("#any").myPlugin("getSelection") then I would like to get the value stored with .data() . What I'd tried:

jqGrid: Disable sorting

六眼飞鱼酱① 提交于 2019-12-20 17:26:20
问题 I am adding rows manually to jqGrid using addRowData , and the order of these rows must be maintained. However, when paging, all rows are reordered to sort by the grid's first visible column. I have turned off all sorting options that I can find documented. How can I prevent all sorting and maintain the order of rows across all pages? Code Initialization code being used: $("#grid").jqGrid({ autowidth: false, cmTemplate: {sortable: false}, colModel: config.gridColumnModel height: 600, pager: "

Jquery Full Calendar Questions - Color on group of events & multiple event sources

a 夏天 提交于 2019-12-20 14:46:20
问题 I am looking at jquery full calendar 1.5 and have a couple questions. How would multiple source look like? jQuery $.ajax options You can also specify any of the jQuery $.ajax options within the same object! This allows you to easily pass additional parameters to your feed script, as well as listen to ajax callbacks: $('#calendar').fullCalendar({ eventSources: [ // your event source { url: '/myfeed.php', type: 'POST', data: { custom_param1: 'something', custom_param2: 'somethingelse' } error:

Delete files programmatically with jquery fileupload basic

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 11:42:08
问题 I'm using the blueimp file upload plugin (the basic version) to implement multifile upload. I am trying to implement functionality to allow the user to remove queued files for upload. I cannot figure out how to access the files array appropriately. Every time in the add callback, the index is 0 and the files array length is 1 (it only contains the file the user clicked to remove). I'm adding a link for each file queued to a div, which is clickable and should remove the file if clicked. My

How to animate diagrams with jQuery and jQplot (updating data)

戏子无情 提交于 2019-12-20 09:45:46
问题 I am "animating" diagrams over time by changing the data and redrawing them. // initialization var data = ... var targetPlot = $.jqplot('#diagram', data, diagramOptions); Now after some time I will change the data in some way and want to update the diagram. The following solution works: // update Data targetPlot.data = ...; // remove old diagram $('#<%= "diagram" + diagram.id.to_s %>container').empty(); // redraw targetPlot = $.jqplot('#diagram', data, diagramOptions); Bit this is a complete

jQuery Autocomplete using extraParams to pass additional GET variables

喜欢而已 提交于 2019-12-20 09:24:08
问题 I am referring specifically to the jQuery Autocomplete v1.1 plugin by Jörn Zaefferer [source: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/] as there seems to be quite a few variations of this plugin. I'm trying to pass additional parameters to the server when the user starts typing because I have multiple fields that I want autocomplete to provide suggestions for. In addition to the query, I want to send the input name attribute to the server but I can't seem to use $(this

Jquery Timeline plugins [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-20 08:50:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am in search for jquery timeline plugin with years on the horizontal axis. I have seen one in the past. I am not able to find it. Did search for jquery timeline plugins. 回答1: Here are 2 that I had stored in my bookmarks. They aren't jquery plugins, but they could be adapted to be jquery plugins. Eric Meyer's

Alternatives to jQuery endless scrolling

梦想的初衷 提交于 2019-12-20 08:07:52
问题 Are there any alternatives to the jQuery endless scrolling plugin? http://www.beyondcoding.com/2009/01/15/release-jquery-plugin-endless-scroll/ 回答1: For example the infinite scroll plugin 回答2: This should do the same trick without plugin $(window).scroll(function () { if ($(window).scrollTop() >= $(document).height() - $(window).height() - 100) { //Add something at the end of the page } }); EDIT Jan 15, 2014 According to @pere's comment, it's better to use the code below to avoid excessive