Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($){
- $.fn.jqDepCalc = function(options){
- var defaults = {
- x:"",
- ftd: 0,
- tgt:""
- }
- return this.each(function(){
- var $this = $(this);
- if(options){
- var o = $.extend(defaults,options);
- }
- if(o.x == 1 || o.x == 9){
- o.ftd = 0;
- }else{
- o.ftd = o.ftd+1
- }
- //alert(o.ftd);
- $(o.tgt).val(o.ftd);
- })
- };
- })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement