@@ -244,7 +244,7 @@ the specific language governing permissions and limitations under the Apache Lic
244244 function measureTextWidth ( e ) {
245245 if ( ! sizer ) {
246246 var style = e [ 0 ] . currentStyle || window . getComputedStyle ( e [ 0 ] , null ) ;
247- sizer = $ ( "< div></div>" ) . css ( {
247+ sizer = $ ( document . createElement ( " div" ) ) . css ( {
248248 position : "absolute" ,
249249 left : "-10000px" ,
250250 top : "-10000px" ,
@@ -725,7 +725,7 @@ the specific language governing permissions and limitations under the Apache Lic
725725 if ( compound ) { node . addClass ( "select2-result-with-children" ) ; }
726726 node . addClass ( self . opts . formatResultCssClass ( result ) ) ;
727727
728- label = $ ( "< div></div>" ) ;
728+ label = $ ( document . createElement ( " div" ) ) ;
729729 label . addClass ( "select2-result-label" ) ;
730730
731731 formatted = opts . formatResult ( result , label , query ) ;
@@ -1432,7 +1432,7 @@ the specific language governing permissions and limitations under the Apache Lic
14321432 // single
14331433
14341434 createContainer : function ( ) {
1435- var container = $ ( "< div></div>" , {
1435+ var container = $ ( document . createElement ( " div" ) . attr ( {
14361436 "class" : "select2-container"
14371437 } ) . html ( [
14381438 " <a href='javascript:void(0)' onclick='return false;' class='select2-choice'>" ,
@@ -1830,7 +1830,7 @@ the specific language governing permissions and limitations under the Apache Lic
18301830
18311831 // multi
18321832 createContainer : function ( ) {
1833- var container = $ ( "< div></div>" , {
1833+ var container = $ ( document . createElement ( " div" ) . attr ( {
18341834 "class" : "select2-container select2-container-multi"
18351835 } ) . html ( [
18361836 " <ul class='select2-choices'>" ,
0 commit comments