My reference to google hosted jQuery seems to want to load as an image somehow:
Also, how is modernizr loading ga.js, plugins.js and main.js? And how do I prevent it from loading the local version of jQuery?
These are my two script tags:
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<script type="text/javascript">Modernizr.load(['//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', 'js/less.js']);</script>
See if you have any luck with the following to load the jquery and less scripts:
<script>
Modernizr.load({
load: [
"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js",
"js/less.js"
]
});
</script>
Update
Also, how is modernizr loading ga.js, plugins.js and main.js? And how do I prevent it from loading the local version of jQuery?
If I'm reading your question correctly, at the moment modernizr isn't loading ga.js, plugins.js or main.js. You would either need to add them to the above load script or reference them with another script tag. Likewise for your local version of jQuery.
Good luck!
Related
laravel-ckeditor is not loading in browser, I followed the installation process as described here https://github.com/UniSharp/laravel-ckeditor#publish-the-resources
Also when I open view source in browser and goto the link, it says Sorry, the page you are looking for could not be found.
I have already added registered it to Application Service Providers located in config/app.php as:
Unisharp\Ckeditor\ServiceProvider::class
ran command:
php artisan vendor:publish --tag=ckeditor
without error
and I have initiated ckeditor by jquery selector as:
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
<script src="/vendor/unisharp/laravel-ckeditor/adapters/jquery.js"></script>
<script>
$('textarea').ckeditor();
// $('.textarea').ckeditor(); // if class is prefered.
</script>
best suggestion use cdns link
or download put in public folder and you should include Jquery before ckeditor link
or you try this also
<script src="{{base_path().('/vendor/theseer/build.xml')}}"></script>
I've a problem with my website, the layout load properly (and CSS) but no JS and page in yield.
I've copy paste the layout of my other website, inclued tje JS and CSS file, I do not understand why it does not work while on other sites it's good..
Code for include the JS and CSS file: <script src="{{url('js/jquery.min.js')}}"></script>
As you can see, the page is empty, and this is not normal.
Image of error:
Ahh... ok.
I've forget to DL From:: into my project. Sorry
I had the same problem when I was creating a recent Laravel project however mine was narrowed down too 2 problems. 1 being the JS had an error and 2nd was the way I called it.
I fixed it by doing the following:
<script type="text/javascript" src="{!! asset('js/jquery.min.js') !!}"></script>
Currently my angular app is dynamically loaded into the current webpage. This means that as well as all scripts (angular.min.js / controllers etc) and is loaded with the Wicket AJAX request and injected in the current webpage.
The scripts are included in the head, the div injected in some form in the body.
At this point Angular should detect the div and start up the app, but nothing happens. when i try to use console.log(angular) i get angular just like with an normal app. When i try to load the same webpage (without the AJAX injection) the app starts up fine.
How can i manually start AngularJS, or notify to start?
http://docs.angularjs.org/guide/bootstrap
Manual Initialization
If you need to have more control over the initialization process, you can use a manual bootstrapping method instead. Examples of when
you'd need to do this include using script loaders or the need to
perform an operation before Angular compiles a page.
<!doctype html>
<html xmlns:ng="http://angularjs.org">
<body>
Hello {{'World'}}!
<script src="http://code.angularjs.org/angular.js"></script>
<script>
angular.element(document).ready(function() {
angular.bootstrap(document);
});
</script>
</body>
</html>
In short: Remove ngApp directive from your html and manually bootstrap
Developer guide has the most you need, I suggest everyone to read it.
I am using ajax controls. When I attach jquery.unobtrusive-ajax.min.js file only I am getting "Error: 'jQuery' is undefined". But when I attach jquery-1.4.4.min.js file too, everything is ok. Why?
Make sure you load it as follows:
<script src="#Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script src="#Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
It uses jQuery that is why it is needed. Plugins are built on top of jQuery and uses jQuery as the base. That is why it is needed on every page that has a jQuery plugin.
It's like building a house with no foundation. What will happen? The house will fall apart because there is nothing that it can stand on. The same scenario applies here.
because it uses jQuery... so you must include jQuery!
you need to include the reference to jQuery library for other jQuery plugins to work. Without jQuery present in your page,you can not run any jQuery plugins.
i am using script tag in my MVC view and my src for Script tag is "http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js".
the issue iam facing is html buttons are not working/postingback.
If i remove script tag,everything works fine.
whts the actuals problem with my code.?
there could be number of issues, the script tag you are refereing to includes the jquery library from the CDN. One possibility could be that there is some javascript code in the view that is disabling your buttons you can verify by doing the following
1) keep the script tag (jQuery) included in the view
2) in the script section of your view (if you have else create one like)
<script>
$(function(){
$(":button").removeAttr("disabled");
});
</script>
3) so your final code will look like
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script>
<script>
$(function(){
$(":button").removeAttr("disabled");
});
</script>
check now if it works... if it works then it means that you have some code that is disabling the buttons and upon removal of jquery library js error would have occured that why it seems to work...