diff --git a/bokeh/resources.py b/bokeh/resources.py
index b78021b7a..3fdf39ebf 100644
--- a/bokeh/resources.py
+++ b/bokeh/resources.py
@@ -245,7 +245,7 @@ class Resources(object):
         def pad(text, n=4):
             return "\n".join([ " "*n + line for line in text.split("\n") ])
 
-        wrapper = lambda code: '$(function() {\n%s\n});' % pad(code)
+        wrapper = lambda code: 'Bokeh.$(function() {\n%s\n});' % pad(code)
 
         if self.dev:
             js_wrapper = lambda code: 'require(["jquery", "main"], function($, Bokeh) {\nBokeh.set_log_level("%s");\n%s\n});' % (self.log_level, pad(wrapper(code)))

$ can get overridden in the Notebook 
It is (evidently) possible for other libraries to override `$`, and then our use of `$(function() ...)` as `js_wrapper` here:

https://github.com/bokeh/bokeh/blob/master/bokeh/resources.py#L248

is fragile, and can cause problems, specifically plots not reloading. This was reported here:

https://groups.google.com/a/continuum.io/forum/#!topic/bokeh/7CJxL7cKxXs

@mattpap just changing to `Bokeh.$` seems to work fine. Do you have any other input?
diff --git a/bokeh/tests/test_resources.py b/bokeh/tests/test_resources.py
index a94b08daf..3d6858293 100644
--- a/bokeh/tests/test_resources.py
+++ b/bokeh/tests/test_resources.py
@@ -5,13 +5,13 @@ from os.path import join
 import bokeh
 import bokeh.resources as resources
 
-WRAPPER = """$(function() {
+WRAPPER = """Bokeh.$(function() {
     foo
 });"""
 
 WRAPPER_DEV = '''require(["jquery", "main"], function($, Bokeh) {
 Bokeh.set_log_level("info");
-    $(function() {
+    Bokeh.$(function() {
         foo
     });
 });'''

pip install bokeh
parse_log_pytest
pytest
pytest
apt-get update apt-get install -y gcc
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
bokeh==3.4.3
contourpy==1.3.0
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
Jinja2==3.1.6
MarkupSafe==3.0.2
numpy==2.0.2
packaging @ file:///croot/packaging_1734472117206/work
pandas==2.2.3
pillow==11.1.0
pluggy @ file:///croot/pluggy_1733169602837/work
pytest @ file:///croot/pytest_1738938843180/work
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
tornado==6.4.2
tzdata==2025.2
xyzservices==2025.1.0

name: bokeh
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - bokeh==3.4.3
      - contourpy==1.3.0
      - jinja2==3.1.6
      - markupsafe==3.0.2
      - numpy==2.0.2
      - pandas==2.2.3
      - pillow==11.1.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.2
      - six==1.17.0
      - tornado==6.4.2
      - tzdata==2025.2
      - xyzservices==2025.1.0
prefix: /opt/conda/envs/bokeh

bokeh/tests/test_resources.py::TestResources::test_js_wrapper
bokeh/tests/test_resources.py::TestResources::test_inline bokeh/tests/test_resources.py::TestResources::test_log_level
bokeh/tests/test_resources.py::TestResources::test_absolute bokeh/tests/test_resources.py::TestResources::test_absolute_dev bokeh/tests/test_resources.py::TestResources::test_argument_checks bokeh/tests/test_resources.py::TestResources::test_basic bokeh/tests/test_resources.py::TestResources::test_cdn bokeh/tests/test_resources.py::TestResources::test_module_attrs bokeh/tests/test_resources.py::TestResources::test_relative bokeh/tests/test_resources.py::TestResources::test_relative_dev bokeh/tests/test_resources.py::TestResources::test_server bokeh/tests/test_resources.py::TestResources::test_server_dev
bokeh/resources.py
bokeh/resources.py