Can anyone explain why I can chain a native JavaScript function to a jQuery function like so:
$('#search').val().replace("00:00:00", "")
In this case, replace is the native JavaScript function.
http://www.w3schools.com/jsref/jsref_replace.asp
Thanks
In this case
val()must be returning astringvalue and hencereplaceworks as expected. It’s no different than calling a function which returns astringand chaining that