Home >Web Front-end >JS Tutorial >Solve the problem of conflict between custom $(id) method and jquery selector $_jquery
Usually just change your function name:
It is easier and simpler, just replace it in batches.
First enter the code:
This code imitates jquery's custom id selector method, but because jquery selector also uses the "$", if you quote jquery and use this method, the page will report an error. The best solution is to modify it Change "$" to "getId(id)" in your own method;