1


I've done a search, and I've found a few results, but none that seem to work - hoping someone can help me or point me in the right direction.

I have a web page with jQuery loaded and a 3rd party script, News Ticker. I have an existing site with this working fine with no problems, however, when I copy the code to another side, I keep getting:
Uncaught TypeError: Object #<Object> has no method 'newsticker'

The code causing this error is the following:

$(document).ready(function() {
    $("#guestbook").newsticker();
});

The News Ticker script details can be seen at their site - http://www.texotela.co.uk/code/jquery/newsticker/.

Thanks in advance!


Following up on my comment: B1 Xor B2 < 2^K if and only if B1 and B2 agree on all but the K low order bits, so G has the very special structure of being complete multipartite, with partition labels consisting of all but the K low order bits. A complete multipartite graph is Hamiltonian if and only if there is no majority partition. Plug this fact into Attempt 2.

4

2 回答 2

0

因为 newsTicker有一个大写 T

$("#guestbook").newsTicker();

您必须警惕 JS 在其语法中区分大小写。

于 2012-06-22T23:29:18.023 回答
0

该元素可能不存在。尝试这个:

$(document).ready(function() {

    alert("jQuery loaded!");

    if($("#guestbook").length == 0)
        alert("#guestbook doesn't exist");
    else if(!('newsTicker' in $("#guestbook")))
        alert("newsTicker not loaded");
    else
        $("#guestbook").newsTicker();
});
于 2012-06-22T23:32:43.900 回答