dynamitem
dynamitem

Reputation: 1669

Laravel 4 Blade Templating

I've experienced an problem. When I used lets say <script src="js/app.js"></script> and things like that it was returning the error when I inspected element and went onto console in chrome, but atleast the dropdown and the scripts worked. When I changed to things like:

{{ HTML::script('http://code.jquery.com/jquery-1.10.2.js') }}
{{ HTML::script('js/bootstrap.min.js') }}
{{ HTML::script('js/prettify.js') }}
{{ HTML::script('js/scripts.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/jquery.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-transition.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-alert.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-modal.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-dropdown.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-scrollspy.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-tab.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-tooltip.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-popover.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-button.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-collapse.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-carousel.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-typeahead.js') }}

it wouldn't work. there is no console errors when I inspect element, but the site won't load it for some reason. Has anyone experienced this?

Upvotes: 0

Views: 2454

Answers (1)

Maciej A. Czyzewski
Maciej A. Czyzewski

Reputation: 1529

// Jquery
{{ HTML::script('http://code.jquery.com/jquery-2.0.0.min.js') }}
// Your's scripts
{{ HTML::script('/js/bootstrap.min.js') }}
{{ HTML::script('/js/prettify.js') }}
{{ HTML::script('/js/scripts.js') }}
// Twitter bootstrap
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-transition.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-alert.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-modal.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-dropdown.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-scrollspy.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-tab.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-tooltip.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-popover.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-button.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-collapse.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-carousel.js') }}
{{ HTML::script('http://twitter.github.io/bootstrap/assets/js/bootstrap-typeahead.js') }}

If the problem is still, please give a screenshot of the debugger - laravel.

Upvotes: 2

Related Questions