Opened 11 years ago
Closed 11 years ago
#27327 closed defect (bug) (invalid)
Twenty Fourteen: jquery on toggle search has alert
Reported by: | blondishnet | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Bundled Theme | Keywords: | close |
Focuses: | javascript | Cc: |
Description (last modified by )
While inspired to use the same drop down toggle search feature as Twenty Fourteen, I was inspecting the code from between line 57 and line 69 of functions.js.
This is the alert that came up.
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
I ended up doing my own type of work around with this -
Whether you use that or some or none... no worries. Just wanted to let you know about the alert
jQuery(document).ready(function($){ $('#toggle-search').on('click', function(e){ e.preventDefault(); $('#search-container').slideToggle(); }) });
Change History (4)
Note: See
TracTickets for help on using
tickets.
Can reproduce it on demo site on wp.com, couldn't reproduce on latest trunk. It seems to have been fixed with r27027, updating jQuery to 1.11.
See jQuery tickets here and here.
Thanks for bringing it to our attention Nile!