...typeof config === 'object' && config ? config : {}
}
- if (typeof config.target !== 'string') {
+ if (typeof config.target !== 'string' && Util.isElement(config.target)) {
let id = $(config.target).attr('id')
if (!id) {
id = Util.getUID(NAME)
.show()
.find('#scrollspy-example')
.bootstrapScrollspy({
- target: document.getElementById('#ss-target')
+ target: document.getElementById('ss-target')
})
$scrollspy.one('scroll', function () {
</tr>
<tr>
<td>target</td>
- <td>string</td>
+ <td>string | jQuery object | DOM element</td>
<td></td>
<td>Specifies element to apply Scrollspy plugin.</td>
</tr>