5 test("should provide no conflict", function () {
6 var affix = $.fn.affix.noConflict()
7 ok(!$.fn.affix, 'affix was set back to undefined (org value)')
11 test("should be defined on jquery object", function () {
12 ok($(document.body).affix, 'affix method is defined')
15 test("should return element", function () {
16 ok($(document.body).affix()[0] == document.body, 'document.body returned')
19 test("should exit early if element is not visible", function () {
20 var $affix = $('<div style="display: none"></div>').affix()
21 $affix.data('bs.affix').checkPosition()
22 ok(!$affix.hasClass('affix'), 'affix class was not added')