Hi i have a problem with load file when my window browser change width. My seperate with on 769px
<script type="javascript">
jQuery(document).ready(function($){
loadJS = function(src) {
var jsLink = $("<script type='text/javascript' src='"+src+"'>");
$("head").append(jsLink);
};
$(window).bind("load", function() {
var width = $(window).width();
if (width <= 768) {
loadJS("js/selectFx.js"); }
else {
loadJS("js/selectFx_769.js");
}
});
});
</script>
OK, U have right with load file.
I have a file which is responsible for the menu is in javascript.
I made two such files that I want to work depending on the resolution, which the javascript code can be divided so that going abroad to load a second 786 code?
Currently this so that for the first time in loading checks the resolution and the fragment is loaded, and I would like to work is responsive.
<script type="javascript">
if (window.innerWidth>=769)
{
file code
}
</script>