文章分类 - jquery
摘要:jquery trim重写<pre>String.prototype.trim = function(char, type) { if (char) { if (type == 'left') { return this.replace(new RegExp('^\\' + char + '+',
阅读全文
摘要:jquery tweenmax时间轴动画<pre><!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8" /> <title>{$title}</title> <meta name="viewport" content="width=
阅读全文
摘要:在项目中使用接口的比较多,在客户端跨域访问,jquery中只能使用jquery ajax的jsonp方法。 值得注意的是,jQuery.ajax()只支持get方式的跨域,post的方式是不支持的。<pre> <script type="text/javascript"> // 简写形式 $.get
阅读全文