zoukankan      html  css  js  c++  java
  • jquery 添加方法 : $.fn.方法名 = function(参数a,b,c){

           $.fn.image_checked = function(self,status,img_body,csrf_token){
                 $(this).live('click', function(){
            var index = $(this).index()
            var img_id = $('.'+self+' input').eq(index).val();
                    $.ajax({
                type:'POST',
                            url:BASEURL+'img/checked_image',
                data:{status:status,img_id:img_id,csrf_token_name:csrf_token},
                success:function(msg)
                {
                    $("."+img_body).html(msg);
                    $('.mark').imgbig('.mark');
                                    tips_load($('.tabs_nav_active').children().children().eq(0).html(),'.cur')
                }
            })

            })
           }


        $.fn.tabs = function(tab_content){
            $(this).each(function(i) {
                $(this).click(function() {
                    $(tab_content).addClass('tabs_content_hide').removeClass('cur')
                    $(tab_content).eq(i).removeClass('tabs_content_hide').addClass('cur')
                    $(this).siblings().removeClass('tabs_nav_active')
                    $(this).addClass('tabs_nav_active')
                });
        });

  • 相关阅读:
    Magento开发文档(一):Magento入门
    Magento开发文档(三):Magento控制器
    CSS 第一天
    iOS 关闭定时器
    thinkphp 5.0 Request使用
    iOS icon与启动图片
    数组
    PHP获取表单变量
    iOS ipa 包优化
    UIImage 渲染模式
  • 原文地址:https://www.cnblogs.com/legend-song/p/3824441.html
Copyright © 2011-2022 走看看