Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6216115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:10:36+00:00 2026-05-24T07:10:36+00:00

I am using jquery in the master page and javascript in the content page.

  • 0

I am using jquery in the master page and javascript in the content page. When Jquery is used alone it works fine. But when I use the javascript(content page) along with jquery(master page) then jquery in master page stops working.

master page script

$(document).ready(function() {

// set up the accordion
$("#accordion>h3").click(function() {
    $(this).next("div").slideToggle(500).siblings("div").slideUp(500);
});

// show active menu section
setTimeout('$("#accordion>div.activesec").slideToggle(800)', 100);

});

content page script

$('slideshow').style.display = 'none';
$('wrapper').style.display = 'block';
var slideshow = new TINY.slideshow("slideshow");
window.onload = function () {
    slideshow.auto = true;
    slideshow.speed = 5;
    slideshow.link = "linkhover";
    slideshow.info = "information";
    slideshow.thumbs = "slider";
    slideshow.left = "slideleft";
    slideshow.right = "slideright";
    slideshow.scrollSpeed = 4;
    slideshow.spacing = 5;
    slideshow.active = "#fff";
    slideshow.init("slideshow", "image", "imgprev", "imgnext", "imglink");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T07:10:37+00:00Added an answer on May 24, 2026 at 7:10 am

    Ok, so it looks like the other script uses $, just like jQuery. You need to use $.noConflict() to prevent namespace clashes:

    var $j = jQuery.noConflict();
    
    $j(document).ready(function() {
    
    // set up the accordion
    $j("#accordion>h3").click(function() {
        $j(this).next("div").slideToggle(500).siblings("div").slideUp(500);
    });
    
    // show active menu section
    setTimeout('$j("#accordion>div.activesec").slideToggle(800)', 100);
    

    If you don’t want to use $j instead of $ in all jQuery functions, you can wrap everything (except the content page scripts!) in a function that assigns $ to jQuery:

    (function( $ ){
      // everything inside works normally with $
    })( jQuery ); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a jquery form validation in the master page and it works fine
I have 4 content placeholder from my master page and I am using the
In my ASP.Net app, which is javascript and jQuery heavy, but also uses master
I am using master page and content page. In content page I am using
I am using jQuery session in my master page. Anything I'm missing? Code: <script
I am using a Master Page and added jQuery script references in the HEAD
I have a master-detail page, in which I use GridView to display multiple rows
Master page contains 2 columns: Left column is JQuery UI accordion whose width can
Problem: I have a master page dictating the css, html, head, body content so
I have an ASP.NET 4 web app. I am using a Master Page Site.Master.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.