Questions tagged [zepto]

Zepto.js is a minimalist JavaScript framework for modern browsers, with a jQuery-compatible syntax.

From the project-site: http://zeptojs.com/

"Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you already know how to use Zepto.

While 100% jQuery coverage is not a design goal, the APIs provided match their jQuery counterparts. The ultimate goal is to have a ~5-10k library that downloads and executes fast, with a familiar and versatile API, so you can concentrate on getting stuff done."

Source code: https://github.com/madrobby/zepto

319 questions
205
votes
7 answers

Get position/offset of element relative to a parent container?

How can I retrieve the offset of a container relative to a parent with pure JS?
matt
  • 42,713
  • 103
  • 264
  • 397
84
votes
6 answers

What is the difference between Zepto and jQuery 2?

There are those two similar projects: Zepto.js Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. jQuery 2.0 jQuery 2.0 beta: Here is your taste of the future, a jQuery that can be faster and…
jantimon
  • 36,840
  • 23
  • 122
  • 185
51
votes
5 answers

How do I POST an array of objects with $.ajax (jQuery or Zepto)

I'd like to POST an array of objects with $.ajax in Zepto or Jquery. Both exhibit the same odd error, but I can't find what I'm doing wrong. The data saves to the server when sent using a test client like 'RestEasy', and I can see the request…
SimplGy
  • 20,079
  • 15
  • 107
  • 144
26
votes
10 answers

Zepto fallback to jQuery

I'm using ZeptoJS for my web app, but I'd like to fall back to jQuery if the browser doesn't support Zepto. Since IE is the only major browser not supported at the moment, I'm tempted to detect IE: if(navigator.appName == 'Microsoft Internet…
jos3000
  • 263
  • 1
  • 3
  • 5
22
votes
5 answers

How to implement my own history stack in a single page mobile web application?

I have a single-page mobile application developed with Backbone and Zepto. It works correctly with the back/forward buttons in the browser. When the user navigates to a page, the new content slides in from the right as the old contents slides away…
alex
  • 479,566
  • 201
  • 878
  • 984
20
votes
5 answers

jQueryMobile on Zepto.js?

I'm wondering if someone has tried already to port jQueryMobile on top of Zepto.js (http://zeptojs.com/) instead of the required jQuery?
Samber Valley
  • 261
  • 1
  • 2
  • 5
16
votes
3 answers

View event listeners - Javascript

I'm wondering if it is possible to view 1. How many event listeners 2. What type of event listener On a single web page. Reason being is because I'm using off(); method. I'm using this framework, which is basically jQuery but not. Yeah, I'm using…
iConnor
  • 19,997
  • 14
  • 62
  • 97
15
votes
4 answers

Backbone.js Memory Management, Rising DOM Node Count

Situation: I'm working on a pretty decently complex single page Backbone app that could potentially be running for 8-12+ hours straight. Because of this, there's a need to ensure that the application won't leak and have a reputation for crashing…
12
votes
2 answers

Is Zepto.js only to be used for mobile web apps or can it be used for desktop just like jQuery?

The Zepto.js website says: Zepto.js is a minimalist JavaScript framework for mobile WebKit browsers, with a jQuery-compatible syntax. Is it only recommended for use with apps that will be used on mobile devices or can it also be used in…
aalaap
  • 4,145
  • 5
  • 52
  • 59
11
votes
5 answers

JS: regex for numbers and spaces?

I'm using happyJS and use the regex underneath for phone validation phone: function (val) { return /^(?:[0-9]+$)/.test(val); } However this ONLY allows numbers. I want the user to be able to enter spaces as well like 238 238 45383 Any…
matt
  • 42,713
  • 103
  • 264
  • 397
9
votes
4 answers

How to implement jquery like slideDown() in zepto

I am using zepto library for my mobile web site. I have recently learnt that zepto does not have slideDown() plugin like jquery. I would like to implement the same for zepto. I have tried one on jsfiddle (http://jsfiddle.net/goje87/keHMp/1/). Here…
Goje87
  • 2,839
  • 7
  • 28
  • 48
8
votes
3 answers

how does jquery fadeIn work? Doing the same with animate()

I love the simple jQuery fadeIn() function, especially because it works without having to set any opacity values to the selector! Just setting it to display:none and using fadeIn() always works. However I'm not using jQuery for my current project…
matt
  • 42,713
  • 103
  • 264
  • 397
7
votes
1 answer

How to fallback from Zepto, to Google CDN jQuery, to local jQuery?

I've seen pages that instruct or ask how to fallback from Zepto to jQuery (especially for IE), as here on SO and here on Zepto.js official page. I've also seen examples on how to fallback from Google-hosted jQuery to a local site jQuery, as in…
superjos
  • 12,189
  • 6
  • 89
  • 134
6
votes
1 answer

Sortable/draggable list items without jQuery UI (or jQuery at all?)

I've been looking for a Javascript plugin that would provide the same basic functionnality as jQuery UI Sortable. Wich is dragging and dropping items for reordering them. In my case those items are
  • tags. Basically, I don't want to use jQuery UI…
  • Leo
    • 5,069
    • 2
    • 20
    • 27
    6
    votes
    2 answers

    How to test for mobile webkit

    I'm looking to build a new website and want to take a responsible "mobile-first" approach. One tenet of this methodology is to only load what you need, and to avoid including large wasteful libraries and frameworks until you actually need them. For…
    gillesv
    • 836
    • 2
    • 8
    • 19
    1
    2 3
    21 22