Skip to content

Commit

Permalink
Remove legacy syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuupola committed Sep 12, 2014
1 parent ee87467 commit 7f8edd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 448 deletions.
4 changes: 2 additions & 2 deletions jquery.chained.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
* Project home:
* http://www.appelsiini.net/projects/chained
*
* Version: 0.10.0
* Version: 1.0.0-dev
*
*/

;(function($, window, document, undefined) {
"use strict";

$.fn.chained = function(parent_selector, options) {
$.fn.chained = function(parent_selector) {

return this.each(function() {

Expand Down
17 changes: 4 additions & 13 deletions jquery.chained.remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,16 @@
* Project home:
* http://www.appelsiini.net/projects/chained
*
* Version: 0.10.0
* Version: 1.0.0-dev
*
*/

;(function($, window, document, undefined) {
"use strict";

$.fn.remoteChained = function(parents, url, options) {

var settings;
/* New style syntax. */
if ("object" === typeof(parents) && "undefined" !== typeof(parents.url)) {
settings = $.extend({}, $.fn.remoteChained.defaults, parents);
/* Still support old style syntax. */
} else {
settings = $.extend({}, $.fn.remoteChained.defaults, options);
settings.parents = parents;
settings.url = url;
}
$.fn.remoteChained = function(options) {

var settings = $.extend({}, $.fn.remoteChained.defaults, options);

/* Loading text always clears the select. */
if (settings.loading) {
Expand Down
Loading

0 comments on commit 7f8edd5

Please sign in to comment.