Unsure Of How To Implement The Noconflict() Code
I am currently designing a website where I am using the jQuery ScrollTo plug-in, which uses the jQuery 1.6.2 library. As part of the website, I am required to create an Ajax conta
Solution 1:
try this:
var jq = jQuery.noConflict();
(function($) {
$(function() {
// more code using $ as alias to jQuery
});
})(jq );
Solution 2:
I has solved my similar problem by using the below code.
HTML Code:
<divclass="mycssclass"><h2 >FAQs</h2><p >01. <ahref="#06Answer">This is my first Question?</a></p></div>
----
----
<p><aname="01Answer"></a><br>This is my Answer.</p>
JQuery Code:
customfaq: function(){
$('.mycssclass p:eq(1)').click(function(){
var p = $(".mycssclass p:eq(1)");
var position = p.position();
$(document).scrollTo( {top:position.top,left:position.left}, 800 ); });}
For more details, Please look into http://api.jquery.com/scrollTop/ and http://api.jquery.com/category/offset/
Post a Comment for "Unsure Of How To Implement The Noconflict() Code"