Is there a place where Twitter publishes non-minified versions of their javascript files for their buttons and widgets?
E.g. http://platform.twitter.com/widgets.js the minified version.
Related
I have not been able to get an explanation of which files are needed in a JQuery Mobile Web site. The stackoverflow documentation on JQuery Mobile shows that there is one file for css and one file for js:
jquery.mobile-1.4.5.min.css
jquery.mobile-1.4.5.min.js
However, downloading the JQuery Mobile 1.4.5 package one ends up with many more. All files that have ".min" appended to the name of the asset, is a minimized version.
The standard download includes one js (the one mentioned above). That is required, as well as JQuery itself. At this date, the latest jQuery that is compatible with jQuery Mobile 1.4.5:
jquery-2.2.4.js
(correct me if that is not true)
For css files standard download includes:
jquery.mobile-1.4.5.css
jquery.mobile.structure-1.4.5.css
jquery.mobile.theme-1.4.5.css
jquery.mobile.external-png-1.4.5.css
jquery.mobile.icons-1.4.5.css
jquery.mobile.inline-png-1.4.5.css
jquery.mobile.inline-svg-1.4.5.css
It appears to me that the first file contains all the rest. So that one can choose to include all at once with one file. The others, I guess, would be used if less code is wanted in a streamlined version of JQuery Mobile. However if one does not use jquery.mobile.css, which are needed in HTML at the top of the page?
If one uses ThemeRoller, jquery.mobile.theme.css becomes MySITE.css (whatever name was selected during the export process in ThemeRoller). If one uses a custom theme, then that theme css is needed, along with jquery.mobile.structure.css.
If one includes jquery.mobile.icons.css, does that in turn include in the external-png, external-svg, and inline-png files?
And what is "jquery.mobile-1.4.5.min.map" for and when is it needed?
That would all be good information for the documentation in stackoverflow.
I created a custom theme (mysite.css) in ThemeRoller so I include the following in HTML (in the appropriate link of script tag):
mysite.css
jquery.mobile.icons-1.4.5.css
jquery.mobile.structure-1.4.5.css
jquery-2.2.4.min.js
jquery.mobile-1.4.5.js
Is that correct?
I want to use a CDN to reference jQuery for my ASP.Net MVC app.
I do not want to tie the app to a specific version of jQuery.
So, why does every example I can find, seem to reference a specific jQuery version in the CDN path but then use the version agnostic syntax in the '.Include' for the ScriptBundle?
For example:
var cdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js";
bundles.Add(new ScriptBundle("~/bundles/jquery", cdnPath)
.Include( "~/Scripts/jquery-{version}.js"));
Why does the CDN path not simply point to a directory in which multiple jQuery versions may reside and then the CDN server return the latest jQuery version (just as my MVC app would do when fetching scripts from bundles locally).
Or if that is not possible, then why bother with the version agnostic syntax within the .Include() method?
Some major versions of Jquery are not backward compatible. For example jQuery v2 doesn't run on IE 6/7/8. So if your project has to run on those you will have to stick with version 1
EDIT
Include() is for local scripts not the ones in CDN. In case that CDN script could not be fetched for what ever reason, local script is used instead.
I'm building a JS SDK (Library) and I'm planning on giving the users only a JS loader which in turn should load all the assets from a CDN (so we can deploy new code without asking clients to download new versions of the SDK).
The Assets include all the SDK Code, some CSS files, config files and some graphics.
The Javascript code depends on the config files (which should be loaded prior to using the SDK) and the library load should fail if any of the assets fails (for example, a jpeg can't be downloaded).
Just a note - I can't use an IFrame as I need to interact with the hosting page.
How can I accomplish this? Any best practices?
Thanks
easyXDM is a Javascript library that enables you as a developer to easily work around the limitation set in place by the Same Origin Policy, in turn making it easy to communicate and expose javascript API’s across domain boundaries.
How to add jQueryUI plugin to my Blogger (Blogspot) site?
I know I can download it and use it offline, but (as far as I know), you can't upload separate files to Blogspot, so I can't call them with src.
You can download it for offline purpose, but for online purpose you particularly don't have to upload it somewhere. You can use online jQuery libraries direclty and add this snippet code in the footer (Recommended) or header area of the template as per your requirements.
jQuery on Google APIS
Snippet: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
note: 1.2.5 and 1.2.4 are not hosted due to their short and unstable lives in the wild.
jQuery UI on Google APIS
Snippet: <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
note: This library depends on jQuery. You must also load jQuery before loading this module. Version 1.8.3 is not hosted due to its short life, and the alias 1.8.3 actually loads 1.8.4.
OR
Add this code from their official web:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
you can use the custom gadget facility on the blogspot.com site in which you can easily use the javascript and jquery code in one file .
Upload somewhere else, or just link it from google hosted libraries,
https://developers.google.com/speed/libraries/devguide#jquery-ui
I have an MVC 4.5 project that has most of the UI logic organized in jQuery plugins. I want to protect my code by minification and bundling (While I understand that minification will only do so much as far as protection, it's better than leaving formatted and documented source files on the server.)
Ideally, I want my dev server to work as is -- files are non-minified and separated. But, when I deploy to the production server, I want the source files to be removed and only minified bundles to be available. Also note, on many occasions my jQuery plugins load other plugins from JavaScript code (I use head.js), so I cannot use #Script.Render for that.
What technologies do I use -- built-in MVC bundling, SquishIt, Bundler or do I need to resort to MSBuild and Microsoft Axaj Minifier? To recap, I want to remove source JS files and just be left with minified bundles in production, and, preferably, find a way to not change head.js references based on whether files are minified or not.
Thanks for your advice.
Just thought I respond with what I ended up doing here:
To recap: I wanted to obfuscate my source files with minification while not exposing the source JS files in production. I also wanted for head.js to resolve source file URLs to bundle URLs:
Put all non-minified javascript files in a folder viewable only to Admin role
Used bundling built-in to ASP.NET MVC 4.5 to generate bundles
Pointed my head.js tag to an MVC controller that returned head.js code + a javascript array with an x-ref between raw URLs and bundle URLs (available from BundleTable static object)
Bundling occurs outside of ASP.NET membership, so bundles are generated and available to anonymous users even though the source files are in the folder only accessible by Admin. Then, the trick of dynamically augmenting head.js code with server-side generated bundle URLs takes care of calling bundles from JS files.