Making a javascript file
<p>I want to ask if I could combine the following JavaScript code into one file?</p>

<p>as I enter in one file.js</p>

<pre><code>$(document).ready(function(){$(&amp;#39;#slider-with-blocks-1&amp;#39;).royalSlider({arrowsNav:true,arrowsNavAutoHide:false,fadeinLoadedSlide:false,controlNavigationSpacing:0,controlNavigation:&amp;#39;bullets&amp;#39;,imageScaleMode:&amp;#39;none&amp;#39;,imageAlignCenter:false,blockLoop:true,loop:true,numImagesToPreload:6,transitionType:&amp;#39;fade&amp;#39;,keyboardNavEnabled:true,block:{delay:400} })  });
</code></pre>

<p>and</p>

<pre><code>$(document).ready(function(){
$(&amp;#39;.credit &amp;#39;).append(&amp;#39; credit by &amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&amp;#39;);
$(&amp;#39;.credit span&amp;#39;)
.html($(&amp;#39;&lt;a/&gt;&amp;#39;).attr(&amp;#39;href&amp;#39;,&amp;#39;www.google.com&amp;#39;)
 .text(&amp;#39;This is my link to google!&amp;#39;)
 );
$(&amp;#39;.credit span a&amp;#39;)
.attr(&amp;#39;id&amp;#39;, &amp;#39;credit&amp;#39;);
});
</code></pre>

<p>and</p>

<pre><code>$(&amp;quot;[role=&amp;#39;navigation&amp;#39;]&amp;quot;).flexNav(); 
</code></pre>

<p>and </p>

<pre><code>window.onload = function() {
    if (!document.getElementById('credit') || document.getElementById('credit').href != "http://www.google.com/") {
        alert('Kreditnya jangan diilangin sob!');
    }
};
</code></pre>
