我目前的設置有一個鏈接,在用戶點擊動態加載的內容,其中還包括在腳本加載檢查。我希望能夠測試是否加載了外部腳本(特別是Google Maps JS API),如果不是,則繼續前進。 這裏是我的代碼: if(_href == "contact.html") {
// this will run everytime we navigate/click to go to "contact.html"
我得到了錯誤Uncaught TypeError: $(...).popover is not a function在show.html.erb。 Popover在我的導航欄中,並且show.html.erb有jquery插件(bxslider)。我把我的腳本標籤<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jque