Skip to content

Commit

Permalink
<=IE8 support fix
Browse files Browse the repository at this point in the history
HTML element creation with jQuery needs to have valid tags. Newer browsers automatically correct the error,but IE8 and less do not. Non-self-closing HTML tags need closing tags to be valid.
  • Loading branch information
Richard Marscher committed Mar 5, 2014
1 parent 69b7c3f commit 9326c02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BttrLazyLoading.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class BttrLazyLoading

_setOptionsFromData.call @

@$wrapper = $ '<span class="bttrlazyloading-wrapper">'
@$wrapper = $ '<span class="bttrlazyloading-wrapper"></span>'
@$wrapper.addClass @options.wrapperClasses if @options.wrapperClasses and typeof @options.wrapperClasses is 'string'
@$img.before @$wrapper
# The easier way to simulate a responsive image is to use canvas
@$clone = $ '<canvas class="bttrlazyloading-clone">'
@$clone = $ '<canvas class="bttrlazyloading-clone"></canvas>'
_updateCanvasSize.call @

@$wrapper.append @$clone
Expand Down Expand Up @@ -298,4 +298,4 @@ class BttrLazyLoadingGlobal
$.extend true, this.constructor.ranges, object
this

$.bttrlazyloading = new BttrLazyLoadingGlobal()
$.bttrlazyloading = new BttrLazyLoadingGlobal()

0 comments on commit 9326c02

Please sign in to comment.