ciao a tutti, chi sa spiegarmi dove inserire questo codice Tubular jQuery plugin.
grazie.
Requirements and install instructions
JavaScript is required to work in the browser for the video to appear, otherwise the background is blank. The plugin also requires that you load jQuery core on the web page or web site with the typical and universal script code within the <head>:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
According to the instructions, jQuery must appear BEFORE tubular in your HTML document.
<script type="text/javascript" charset="utf-8" src="js/jquery.tubular.1.0.js"> </script>
Then, to load the tubular plugin, tubular must be called AFTER the jQuery core. You will also need to know the YouTube video ID that you want to use as your background video, as well as the div wrapper you will use as the container. The default settings require that you use a wrapper div with the id of wrapper, and then you just attach it to your wrapper div and specify the video you want to load with the code snippet example shown below:
$().ready(function() {
$('#wrapper').tubular({videoId: 'idOfYourVideo'}); // where idOfYourVideo is the YouTube ID.
});[/COLOR]
According to the plugin instructions, you call the tubular plugin on your wrapper div, the outermost containing div below the BODY tag. This must be performed within your $(document).ready() function. Ideally, you will make the call in an external JavaScript file, but you may use it in a SCRIPT block or even inline.
grazie.
Requirements and install instructions
JavaScript is required to work in the browser for the video to appear, otherwise the background is blank. The plugin also requires that you load jQuery core on the web page or web site with the typical and universal script code within the <head>:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
According to the instructions, jQuery must appear BEFORE tubular in your HTML document.
<script type="text/javascript" charset="utf-8" src="js/jquery.tubular.1.0.js"> </script>
Then, to load the tubular plugin, tubular must be called AFTER the jQuery core. You will also need to know the YouTube video ID that you want to use as your background video, as well as the div wrapper you will use as the container. The default settings require that you use a wrapper div with the id of wrapper, and then you just attach it to your wrapper div and specify the video you want to load with the code snippet example shown below:
$().ready(function() {
$('#wrapper').tubular({videoId: 'idOfYourVideo'}); // where idOfYourVideo is the YouTube ID.
});[/COLOR]
According to the plugin instructions, you call the tubular plugin on your wrapper div, the outermost containing div below the BODY tag. This must be performed within your $(document).ready() function. Ideally, you will make the call in an external JavaScript file, but you may use it in a SCRIPT block or even inline.