diff options
author | mrjive <mrjive@mrjive.it> | 2015-01-06 15:13:03 +0100 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-01-06 15:13:03 +0100 |
commit | b80c218606994032e76805900cb9b340ea132358 (patch) | |
tree | bf625cf4c59bf521e639018399bf1770d116a6a0 /library/jslider/js/jquery.dependClass-0.1.js | |
parent | aa6d61d3b19cb13c30bf5a1579adefedf0cc9515 (diff) | |
parent | 3185bfe3ca131d471b8fcdc0c94abf1a114486c7 (diff) | |
download | volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.tar.gz volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.tar.bz2 volse-hubzilla-b80c218606994032e76805900cb9b340ea132358.zip |
Merge pull request #1 from friendica/master
test pull request
Diffstat (limited to 'library/jslider/js/jquery.dependClass-0.1.js')
-rw-r--r-- | library/jslider/js/jquery.dependClass-0.1.js | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/library/jslider/js/jquery.dependClass-0.1.js b/library/jslider/js/jquery.dependClass-0.1.js deleted file mode 100644 index 2636f6673..000000000 --- a/library/jslider/js/jquery.dependClass-0.1.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * jquery.dependClass - Attach class based on first class in list of current element - * - * Written by - * Egor Khmelev (hmelyoff@gmail.com) - * - * Licensed under the MIT (MIT-LICENSE.txt). - * - * @author Egor Khmelev - * @version 0.1.0-BETA ($Id$) - * - **/ - -(function($) { - $.baseClass = function(obj){ - obj = $(obj); - return obj.get(0).className.match(/([^ ]+)/)[1]; - }; - - $.fn.addDependClass = function(className, delimiter){ - var options = { - delimiter: delimiter ? delimiter : '-' - } - return this.each(function(){ - var baseClass = $.baseClass(this); - if(baseClass) - $(this).addClass(baseClass + options.delimiter + className); - }); - }; - - $.fn.removeDependClass = function(className, delimiter){ - var options = { - delimiter: delimiter ? delimiter : '-' - } - return this.each(function(){ - var baseClass = $.baseClass(this); - if(baseClass) - $(this).removeClass(baseClass + options.delimiter + className); - }); - }; - - $.fn.toggleDependClass = function(className, delimiter){ - var options = { - delimiter: delimiter ? delimiter : '-' - } - return this.each(function(){ - var baseClass = $.baseClass(this); - if(baseClass) - if($(this).is("." + baseClass + options.delimiter + className)) - $(this).removeClass(baseClass + options.delimiter + className); - else - $(this).addClass(baseClass + options.delimiter + className); - }); - }; - -})(jQuery);
\ No newline at end of file |