The last Zepto 0.8 version break all my script #396

Closed
onigetoc opened this Issue Feb 12, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@onigetoc

Hi,
I stick to the 0.6 or 0.7 version because now simple jQuery function stoped working with Zepto,
what append with the latest version?

@madrobby madrobby closed this Feb 12, 2012

@madrobby

This comment has been minimized.

Show comment Hide comment
@madrobby

madrobby Feb 12, 2012

Owner

Please provide a way for us to reproduce this problem, like example code, error messages and best an online demo.

Owner

madrobby commented Feb 12, 2012

Please provide a way for us to reproduce this problem, like example code, error messages and best an online demo.

@onigetoc

This comment has been minimized.

Show comment Hide comment
@onigetoc

onigetoc Feb 12, 2012

Hi,
jQtouch work with Zepto now but i downloaded the latest Zepto and it break some script.

i'm not sure exactly where the problem is really, just one exemple, i'm using jQtouch and autotitles extension.
The autotitle extension work with old Zepto version but not with the last zepto.

https://github.com/senchalabs/jQTouch
https://github.com/senchalabs/jQTouch/blob/master/extensions/jqt.autotitles.js

simple json call stop working
Calling Twitter api (work with old Zepto)

// Tweet
$('#tweet').on('pageAnimationEnd', function(e, info) {

if (info.direction == 'in') {

    showLoading();
    $("#tweetappend").empty();                

    $.getJSON('http://twitter.com/statuses/user_timeline/' + mydata + '.json?count=10&callback=?', function(data) {

            if (myScroll) {
        myScroll.destroy();
        myScroll = null;
        //alert('destroy iscroll')
    }

    if ($('div#' + e.target.id + ' #wrapper').get(0)) {
        setTimeout(function() {
            myScroll = new iScroll($('div#' + e.target.id + ' #wrapper').get(0));
            //alert('New iscroll');
        }, 0);
    }

        content = '<ul class="rounded">';

        $.each(data, function(i) {
            var tweet = ify.clean(this['text']);
            var d = new Date(this['created_at']);
            var date_show = d.getDate() + '/' + d.getMonth() + '/' + d.getFullYear() + ' ' + d.getHours() + ':' + d.getMinutes();
            content += '<li><img src="' + this.user.profile_image_url + '" style="float:left;" width="48" height="48"/><p>' + tweet + '</p> (<date>' + date_show + '</date>)</li>';
        }); //each
        content += '</ul>';
        $('#tweetappend').html(content);

                mydata = 0;
    hideLoading();

    }); // getjson

} //direction in end

}); //pageAnimationEnd

I asked http://jsfiddle.net/ to add Zepto to there website and they did it 24hour latter. for testing javascript,jquery,zepto ect... online and most of the simple jquery thing i do doesn't work

On left, "Choose Framework" Zepto is the last one

Hi,
jQtouch work with Zepto now but i downloaded the latest Zepto and it break some script.

i'm not sure exactly where the problem is really, just one exemple, i'm using jQtouch and autotitles extension.
The autotitle extension work with old Zepto version but not with the last zepto.

https://github.com/senchalabs/jQTouch
https://github.com/senchalabs/jQTouch/blob/master/extensions/jqt.autotitles.js

simple json call stop working
Calling Twitter api (work with old Zepto)

// Tweet
$('#tweet').on('pageAnimationEnd', function(e, info) {

if (info.direction == 'in') {

    showLoading();
    $("#tweetappend").empty();                

    $.getJSON('http://twitter.com/statuses/user_timeline/' + mydata + '.json?count=10&callback=?', function(data) {

            if (myScroll) {
        myScroll.destroy();
        myScroll = null;
        //alert('destroy iscroll')
    }

    if ($('div#' + e.target.id + ' #wrapper').get(0)) {
        setTimeout(function() {
            myScroll = new iScroll($('div#' + e.target.id + ' #wrapper').get(0));
            //alert('New iscroll');
        }, 0);
    }

        content = '<ul class="rounded">';

        $.each(data, function(i) {
            var tweet = ify.clean(this['text']);
            var d = new Date(this['created_at']);
            var date_show = d.getDate() + '/' + d.getMonth() + '/' + d.getFullYear() + ' ' + d.getHours() + ':' + d.getMinutes();
            content += '<li><img src="' + this.user.profile_image_url + '" style="float:left;" width="48" height="48"/><p>' + tweet + '</p> (<date>' + date_show + '</date>)</li>';
        }); //each
        content += '</ul>';
        $('#tweetappend').html(content);

                mydata = 0;
    hideLoading();

    }); // getjson

} //direction in end

}); //pageAnimationEnd

I asked http://jsfiddle.net/ to add Zepto to there website and they did it 24hour latter. for testing javascript,jquery,zepto ect... online and most of the simple jquery thing i do doesn't work

On left, "Choose Framework" Zepto is the last one

@onigetoc

This comment has been minimized.

Show comment Hide comment
@onigetoc

onigetoc Mar 24, 2012

after trying to get Zepto back in my script (i use it with jQtouch)
it look like that i allway get the same error with .bind

uncaught TypeError Object# method has no method "bind"

errors for:

$(function(){
$('#jqt').bind('pageAnimationStart', function(e, data){
if (data.direction === 'in'){
var $title = $(titleSelector, $(e.target));
var $ref = $(e.target).data('referrer');
if ($title.length && $ref && $title.text() === ''){
$title.html($ref.text());
}
}
});
});

or

$('#home').bind('pageAnimationEnd', function(e, info) {

and

$("#submit").bind(function(e) {
Uncaught TypeError: Object # has no method 'bind'
var s = $("#searchid").val();
sget(s)
//alert(s);
});

after trying to get Zepto back in my script (i use it with jQtouch)
it look like that i allway get the same error with .bind

uncaught TypeError Object# method has no method "bind"

errors for:

$(function(){
$('#jqt').bind('pageAnimationStart', function(e, data){
if (data.direction === 'in'){
var $title = $(titleSelector, $(e.target));
var $ref = $(e.target).data('referrer');
if ($title.length && $ref && $title.text() === ''){
$title.html($ref.text());
}
}
});
});

or

$('#home').bind('pageAnimationEnd', function(e, info) {

and

$("#submit").bind(function(e) {
Uncaught TypeError: Object # has no method 'bind'
var s = $("#searchid").val();
sget(s)
//alert(s);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment