lib/opal/jquery/element.rb in opal-jquery-0.4.0 vs lib/opal/jquery/element.rb in opal-jquery-0.4.1
- old
+ new
@@ -107,10 +107,10 @@
# If no valid elements in string, then an empty collection will be returned.
#
# @param str [String] html content to parse
# @return [Element]
def self.parse(str)
- `$(str)`
+ `$.parseHTML ? $($.parseHTML(str)) : $(str)`
end
# Expose jQuery plugins to become available in ruby code. By default,
# jQuery methods or plugins must be manually exposed as ruby methods.
# This method simply creates an aliasing ruby method to call the original