[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/libraries/bootstrap/js/tests/unit/ -> bootstrap-scrollspy.js (source)

   1  $(function () {
   2  
   3      module("bootstrap-scrollspy")
   4  
   5        test("should be defined on jquery object", function () {
   6          ok($(document.body).scrollspy, 'scrollspy method is defined')
   7        })
   8  
   9        test("should return element", function () {
  10          ok($(document.body).scrollspy()[0] == document.body, 'document.body returned')
  11        })
  12  
  13        test("should switch active class on scroll", function () {
  14          var sectionHTML = '<div id="masthead"></div>'
  15            , $section = $(sectionHTML).append('#qunit-fixture')
  16            , topbarHTML ='<div class="topbar">'
  17            + '<div class="topbar-inner">'
  18            + '<div class="container">'
  19            + '<h3><a href="#">Bootstrap</a></h3>'
  20            + '<ul class="nav">'
  21            + '<li><a href="#masthead">Overview</a></li>'
  22            + '</ul>'
  23            + '</div>'
  24            + '</div>'
  25            + '</div>'
  26            , $topbar = $(topbarHTML).scrollspy()
  27  
  28          ok($topbar.find('.active', true))
  29        })
  30  
  31  })


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1