I have been working on this site for the past two weeks, and so far everything has been working smoothly. I have conflicting javascripts and that's it, although I know which method to use to solve the problem (jquery noconflict), I have no idea how to use it!
In my case, I have:
- drag and drop menu that uses js prototype and custom js
- and a contact form that uses multiple jquery files to validate and report errors
The case is classic, they work fine, but not together. I read a gang of websites, and most of them point to a solution:
<script>
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("div").hide();
});
$('someid').hide();
</script>
I am new to javascript, so I don't know what to do with this snippet.
This is my headline:
<script src="js/prototype.js"></script>
<script src="js/drop-o-matic.js"></script>
<script>
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("div").hide();
});
$('someid').hide();
</script>
<script>
document.createElement("article");
document.createElement("footer");
document.createElement("header");
document.createElement("hgroup");
document.createElement("nav");
document.createElement("aside");
document.createElement("section");
document.createElement("menu");
document.createElement("hgroup");
</script>
drop-o-matic js, js ( IE).
drop-o-matic html5 nav ( ,
<nav>
<ul>
<li><a href="index.php" class="home">Home</a></li>
...
...
...
</ul>
</nav>
, ?
.