Results 1 to 2 of 2

Thread: Null/Undefined error when pagination image markup removed

  1. #1
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Null/Undefined error when pagination image markup removed

    1) Script Title:
    Stepcarousel

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...epcarousel.htm

    3) Describe problem:

    When I remove the pagination images from the markup for the stepcarousel (similar to Demo #2 on the main script page), this error is thrown:
    "TypeError: config.pageinfo.$controls.eq(0).attr("src", config.pageinfo.srcs[0]) is undefined"

    When I replace the pagination markup, the error disappears. My current fix is to apply 'display:none' to hide the code:
    <div class="paginate status paging_full_numbers group-tools">
    <p class="news-image"></p>
    <p id="group-news-paginate">
    <a href="javascript:stepcarousel.stepBy('group-news', -1)" class="previous paginate_button">&lsaquo;</a>
    <span style="display: none;">
    <img src="/images/opencircle.png" data-over="/images/graycircle.png" data-select="/images/closedcircle.png" data-moveby="1" />
    </span>
    <a href="javascript:stepcarousel.stepBy('group-news', 1)" class="next paginate_button">&rsaquo;</a>
    </p>
    </div><!--/group-tools-->

    What is the proper way to disable/remove the pagination images without throwing an error?

    Best Regards,
    tom

  2. #2
    Join Date
    Aug 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Resolved

    I found the problem. I had a div which contained "-paginate" in the id (id="group-news-paginate").

    Because "-paginate" existed in the id, this config setting was defined:
    config.$paginatediv=$('#'+config.galleryid+'-paginate') //get pagination DIV (if defined)

    And because it was defined, quite a few conditionals evaluated to true:
    if (config.$paginatediv.length==1){...

    Changing the id name fixed my issue.

    I hope this helps someone else who may run into this issue.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •