Code Duplication    Length = 10-10 lines in 2 locations

js/bootstrap.js 2 locations

@@ 2320-2329 (lines=10) @@
2317
  // AFFIX PLUGIN DEFINITION
2318
  // =======================
2319
2320
  function Plugin(option) {
2321
    return this.each(function () {
2322
      var $this   = $(this)
2323
      var data    = $this.data('bs.affix')
2324
      var options = typeof option == 'object' && option
2325
2326
      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2327
      if (typeof option == 'string') data[option]()
2328
    })
2329
  }
2330
2331
  var old = $.fn.affix
2332
@@ 2008-2017 (lines=10) @@
2005
  // SCROLLSPY PLUGIN DEFINITION
2006
  // ===========================
2007
2008
  function Plugin(option) {
2009
    return this.each(function () {
2010
      var $this   = $(this)
2011
      var data    = $this.data('bs.scrollspy')
2012
      var options = typeof option == 'object' && option
2013
2014
      if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
2015
      if (typeof option == 'string') data[option]()
2016
    })
2017
  }
2018
2019
  var old = $.fn.scrollspy
2020