Skip to content

Commit 76a7d02

Browse files
Merge pull request #1 from philips-emr/1.11.4_custom_SO-2921446
Position: Make sure of is treated as a CSS selector [SO-2921446]
2 parents 6e6f946 + 96752dd commit 76a7d02

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/position.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ $.fn.position = function( options ) {
141141
options = $.extend( {}, options );
142142

143143
var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
144-
target = $( options.of ),
144+
target = typeof options.of === "string" ?
145+
$( document ).find( options.of ) :
146+
$( options.of ),
147+
145148
within = $.position.getWithinInfo( options.within ),
146149
scrollInfo = $.position.getScrollInfo( within ),
147150
collision = ( options.collision || "flip" ).split( " " ),

0 commit comments

Comments
 (0)