Giter Site home page Giter Site logo

ghost-kaldorei's Introduction

sLib

web develop lib like zepto

API

原型扩展

Array.prototype.distinct

  • 类型:布尔值
  • 默认:false
  • 两种不同的实现,false速度更优

String.prototype.trim

  • 类型:布尔值
  • 默认:false
  • true为去掉字符串内所有空格,false只去掉首位空格

静态方法

$.getCookie(string)

  • 类型:字符串
  • 默认:undefined
  • 根据key取cookie中的value值

$.setCookie(key, value, time)

  • 类型:key字符串,value字符串,time毫秒数数字
  • 默认:time默认一天
  • 根据key取cookie中的value值

$.getElementsByClassName(className, context)

  • 类型:className字符串,context字符串
  • 默认:undefined
  • 根据类名查找节点

$.getUrlParam(str)

  • 类型:字符串
  • 默认:""
  • 返回 Object
  • 获取一个URL参数组成的对象

$.browser

  • 返回 Object
  • 获取一个描述浏览器类型的对象

$.nodelist2Array

$.isArray

$.isNaN

$.isNull

$.isUndefined

$.isPlainObject

$.contains

$.startsWith

$.endsWith

$.repeat

$.camelize

$.underscored

$.dasherize

$.capitalize

$.stripTags

$.stripScripts

$.escapeHTML

$.unescapeHTML

$.format

$.ajax

$.extend

实例方法

hide()

show()

each()

prePend()

addClass()

removeClass()

children()

setCss()

hasCLass()

isLast()

isFirst()

closet()

getIndex()

nextEle()

preEle()

nextSiblings()

preSiblings()

getCss()

css()

insertAfter()

siblings()

offset()

addEvent()

text()

removeEvent()

on()

off()

ghost-kaldorei's People

Contributors

schoeu avatar xiaoluoboding avatar zhouyq avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.