jwestbrook / bootstrap-prototype

PrototypeJS based Sleek, intuitive, and powerful front-end framework for faster and easier web development.
http://twitter.github.com/bootstrap
Apache License 2.0
24 stars 15 forks source link

relying on Scriptaculous !== 'undefined' leads to transition not working #8

Closed mcinp closed 10 years ago

mcinp commented 11 years ago

In bootstrap-transition_prototype.js on line 59 following code is used to determine if Scriptaculous library is loaded typeof Scriptaculous !== 'undefined' && typeof Effect !== 'undefined' there is however a possibility that effects.js is loaded but scriptaculous.js is not, This can happen if

  1. someone manually loads appropriate js components from scriptaculous without using scriptaculous.js
  2. the loading of scriptaculous files is managed programatically (that's how it's done in Prado framework)

my suggestion is to remove the typeof Scriptaculous !== 'undefined' and leave only typeof Effect !== 'undefined'

I tested it to work properly on IE8 & IE9

jwestbrook commented 11 years ago

Actually a good suggestion - are you able to fork the repo and create a Pull Request for this change? - I want to give credit where credit is due.

Thanks!

mcinp commented 10 years ago

as to Pull Request - thank you for the proposal - maybe next time