快速移动Web应用程序的最小jquery替代方案 [英] minimal jquery alternative for fast mobile webapps

查看:203
本文介绍了快速移动Web应用程序的最小jquery替代方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个简单的jq替代品,它尽可能小,或多或少,仅需满足以下条件:

I need a dead simple jq alternative, as tiny as possible and more or less with only requirements:

  • slideUp/down.
  • json get
  • 基本DOM

iPhone外观相似的框架并不能为我做这件事(出于目的过于繁琐),据我所知,这让我留下了xui.js,

The iPhone-look alike-frameworks doesn't do it for me (overdone and heavy for the purpose) which, to my knowledge, leaves me with xui.js, http://xuijs.com/.

不幸的是,slideUp/accordeon-函数似乎有错误,或者至少不能按预期工作.

Unfortunately, the slideUp / accordeon - functions seems buggy or at least not working as expected.

如果周围还有其他最小的图书馆,谢谢您的投入.或者,如果有人可以用手风琴的方式将幻灯片与xui一起使用.

Thankful for any input if there's other minimal libraries around. Or if anyone has got the slideup to work with xui in an accordeon-fashion.

(自上一篇文章请求:网络应用程序的最小框架以来,情况发生了变化.

,那边的Gaby aka G. Petrioli的宝贵信息)

(Things has changed since previous post request: minimal framework for web-apps, valuable information from Gaby aka G. Petrioli over there)

要澄清我在使用xui时遇到的问题,

To clarify my issues with xui, upon using:

x$('#box').tween({ height:'0px', color:'#00ff00', backgroundColor:'blue' }, function()
{
  alert('done!');
});

#box(div)的内容仍然可见,即使带有bg-color的div很好地滑动了.我使用正确吗?

The content of the #box (div) is still visible, even though the div with it's bg-color slides up nicely. Am I using it correctly?

此致

//t

推荐答案

做很多事情的绝对最简单的方法是坚持使用类似于JavaScript的东西.作为最近进行的副项目的一部分,我创建了一组基本功能,这些功能可能对您有用.本质上,它只是一个普通的JavaScript对象,它提供4种简单的动画类型(淡入淡出/淡出+向下滑动/向上滑动)以及一些基本的辅助函数(addClass,removeClass)等.只需从gitHub代码

The absolute lightest way to do a lot of things is stick to something along the lines of vanilla JavaScript. I created a set of basic functions as part of a side project I've been working on recently that may be of use to you. Essentially its just a vanilla JavaScript Object that provides 4 simple animation types (fadein/fadeout + slidedown/slideup) along with some basic helper functions (addClass, removeClass) etc. Just rip the base function out of my gitHub code https://github.com/thybag/JSnip/blob/master/jsnip.js and customise it to your own needs. (Sorry about plugging my link, but I though pasting the code would be overkill) [Note: this also lacks a JSON get method as of now, though I assume finding a vanilla JavaScript function to do this shouldn't be to hard if you do decided to go the plain JavaScript route.]

如果您希望得到更好的支持,可以尝试使用JQuery Mobile版本: http://jquerymobile.com/ 我还听说 http://www.sencha.com/products/touch/是对于移动开发来说非常不错(尽管我认为它的重量仍然很大)

If you'd rather something a little better supported you could just try JQuery Mobile version: http://jquerymobile.com/ I've also heard http://www.sencha.com/products/touch/ is pretty good for mobile development (though I think its still reasonably heavy weight)

对不起,我没有更多帮助.

Sorry I can't be of more help.

这篇关于快速移动Web应用程序的最小jquery替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆