TypeError is not a function

Author
Topic
#2494

I get error TypeError: this.$current.round is not a function at line 5988 when updating the number counter manually but function call “add”

Viewing 2 replies - 1 through 2 (of 2 total)
Author
Replies
  • #2495

    Error comes from the last line in the code below. it wasnt the line 5988. sorry it was line 1 character 5988 in the file pack/counter.pack.js. I have only loaded this and the css file. i use jquery 1.10 but also tested with 1.7 which makes no difference. you can see the complete page here http://omega.loft11312.serverprofi24.de/ for analysis

    <pre class=”brush: javascript; gutter: true; first-line: 1; highlight: []; html-script: false”>var countdown = $('.cst-countdown-timer-' + cd.id).smartNumberCounter({
    skin: "Inline",
    mode: "Counter",
    display: {
    //style: "crystal-dark",
    //hideDots: true,
    //space: "6px"
    },
    model: {
    digits: 6,
    decimals: 0,
    layout: "flat",
    value: 3333,
    method: "down",
    update: 'manual'
    //stepValue: {from: 1, to: 2}
    //max: cd.items_available_stock == '' ? 0 : cd.items_available_stock
    },
    callbacks: {
    change: function() {
    var remaining = countdown.get("current");

  • #2496

    This is not complete code, it is missing code for the callbacks. Also, you are using change callback that is triggered when value has changed, and I am not sure how do you use that if you need to use ‘add’, since change in your case will never run before add is called.

    You have two examples on how to use the add/stop/start functions in the demo page Methods.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘TypeError is not a function’ is closed to new replies.