fmarkiewicz
fmarkiewicz

Reputation: 1

I'm trying to add jQuery 1.9 to bootstrap but in project use jQuery 1.7.2

I have a project, an old one which uses jQ 1.7.2 but in console I'm getting an error from Bootstrap saying BS needs jQuery 1.9 or higher. I can't add jQ 1.9 to whole project because nothing will work. Trying to use jQuery.noConflict() between js requires in application.coffee but no matter how I order it I get this:

TypeError: jQuery is not a function

jQ 1.7.2 getting from gem, jQ 1.9 and BS are files in assets code in application.coffee:

#= require vendor/browser-update
#= require jquery
#= require jquery_ujs
#= require jquery.ui.core
#= require jquery.ui.widget
#= require jquery.ui.mouse
#= require jquery.ui.position
#= require jquery.ui.draggable
#= require jquery.ui.droppable
#= require jquery.ui.button
#= require jquery.ui.dialog
#= require jquery.ui.autocomplete
#= require jquery.ui.tabs
#= require jquery.ui.progressbar
#= require jquery.ui.sortable
#= require jquery-form

#= require_tree ./vendor
#= require js-routes
#= require twitter/bootstrap/bootstrap-tooltip
#= require twitter/bootstrap/bootstrap-popover
#= require variables
#= require_tree ./libraries
#= require profile
#= require rails-timeago
#= require locales/jquery.timeago.pl.js
#= require_tree ./application

# Relics Angular App
#= require lodash
#= require angular
#= require angular-sanitize
#= require angular-cookies
#= require angular-prevent-default
#= require oz-container-helper

#= require angular-google-maps
#= require angular-dragdrop
#= require angular-ui-sortable
#= require angular-bootstrap
#= require ./angular/init
#= require ./angular/router
#= require_tree ./angular

# priv js
#= require oz-edit-modal-request
#= require oz-contrast-changer

# bootstrap js
#= require jquery-1.9.1
#= require bootstrap.js
#= require bootstrap-sprockets
$jq191 = $.noConflict(true)

I also tried adding jQ 1.9 before BS and jQ 1.7.2 but still it doesn't work.

Upvotes: 0

Views: 51

Answers (1)

Saliel Irizarry
Saliel Irizarry

Reputation: 62

The only thing I think that might help is to use an older version of bootstrap. Otherwise, update all the code to 1.9 and up standards.

Upvotes: 0

Related Questions