# Upgrading From Foundation 4

Need to upgrade from Foundation 4? No problem. This handy migration guide makes it super easy!

*** ### Upgrading the JavaScript We have built a migration plugin, [foundation-migrate](http://github.com/zurb/foundation-migrate), that will guide you through moving your old Foundation JavaScript over to the new syntax. Foundation 5 removes support for Zepto. Here's how you can switch Zepto for jQuery:

HTML

```html ``` All you need to do is add jQuery to the end of your `body`:

HTML

```html ``` After you have included jQuery, you can drop in the Foundation library and initialize Foundation:

HTML

```html ``` In Foundation 4, you could pass a string of the plugins you want to initialize like `$(document).foundation('topbar reveal');`. You can no longer do this in Foundation 5. Everything is initialized by default. *** ### Configuration changes Configuration options are passed a little differently to the Foundation libraries:

The old way

{{#markdown}} ```js $(document).foundation('dropdown', {is_hover: false}); ``` {{/markdown}}

The new way

{{#markdown}} ```js $(document).foundation({dropdown: {is_hover: false}}); ``` {{/markdown}}
In Foundation 5 you can reconfigure variables on the fly after the page has loaded and Foundation has been initialized:

JS

{{#markdown}} ```js $('#myTarget').foundation({dropdown: {is_hover: true}}); ``` {{/markdown}} *** ### JavaScript Variable Changes All JavaScript configuration variables are now `under_score` instead of `camelCase`:
Library Foundation 4 Foundation 5
dropdown activeClass active_class
topbar stickyClass sticky_class
joyride tipLocation tip_location
nubPosition nub_position
scrollSpeed scroll_speed
startTimeOnClick start_timer_on_click
startOffset start_offset
nextButton next_button
tipAnimation tip_animation
pauseAfter pause_after
tipAnimationFadeSpeed tip_animation_fade_speed
cookieMonster cookie_monster
cookieName cookie_name
cookieDomain cookie_domain
cookieExpires cookie_expires
tipContainer tip_container
postRideCallback post_ride_callback
postStepCallback post_step_callback
preStepCallback pre_step_callback
preRideCallback pre_ride_callback
postExposeCallback post_expose_callback
exposeAddClass expose_add_class
magellan activeClass active_class
reveal animationSpeed animation_speed
closeOnBackgroundClick close_on_background_click
closeOnEsc close_on_esc
dismissModalClass dismiss_modal_class
bgClass bg_class
tooltip additionalInheritableClasses additional_inheritable_classes
tooltipClass tooltip_class
touchCloseText touch_close_text
appendTo append_to
tipTemplate tip_template