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 7032961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:00:06+00:00 2026-05-28T01:00:06+00:00

I’ve read several posts on SO on similar subjects, but was unable to dissect

  • 0

I’ve read several posts on SO on similar subjects, but was unable to dissect and get my code to function the way I want it too.

I’m creating an app where page content is changed and replaced dynamically. This is the link to the plug-in I used (yes, I tried contacting the developer who programmed the script, but to no-avail).
(css-tricks.com/dynamic-page-replacing-content)

It all works the way it should until I try implementing separate jQuery within {div id=”guts”}. For example, I’m trying to add this script, but it’s not activating. In fact, no other jQuery script will work within this DIV.
(digitalbush.com/projects/masked-input-plugin)

There appears to be some conflict, especially with the hashchange script. I believe this is the source. If I disable the hashchange/dynamic page script, the masked input script works like it should.

Here’s the link to the application I’m working on. This is with the hash-change activated. And if you click the menu items, it changes as it should. However, the masked input does NOT work – and it should active on the “phone number” input field.
http://socialbungy.com/newsite/sweeps_temp_facebook/TAB_TEMP1/#enter.php

If you remove the hashmark in the URL, the page loads and the masked input on the phone number field now works as it should, however the dynamic page functionality is gone.
http://socialbungy.com/newsite/sweeps_temp_facebook/TAB_TEMP1/enter.php

So I know this is the problem, I just can’t figure out how to prevent the conflict. If you look at the page source of /#enter.php you’ll notice the source code for /index.php, not /enter.php. It think this is also a factor. Is this why the script not initiating?

If you guys (and gals?) need my code posted here, which would be a lot, I will. Figured it might be easier to assist with the links, so you can see the structure.

What am I doing wrong? Btw, the pages may be php, but there’s no php code within it.

EDIT:
Here’s the suspected bad code.

$(function() {
var reloadMask = function reloadMask() {
    $(document).ready(function() {
        $("#phone").mask("(999) 999-9999");
    });
}
var newHash      = "",
    $mainContent = $("#appContent"),
    $pageWrap    = $("#page-wrap"),
    baseHeight   = 0,
    $el;        
$pageWrap.height($pageWrap.height());
baseHeight = $pageWrap.height() - $mainContent.height();    
    $("nav").delegate("a", "click", function() {
        window.location.hash = $(this).attr("href");
        return false;
    }); 
    $("#buttonWrap").delegate("a", "click", function() {
        window.location.hash = $(this).attr("href");
        return false;
    });    
$(window).bind('hashchange', function(){    
    newHash = window.location.hash.substring(1);        
    if (newHash) {
        $mainContent
            .find("#guts")
            .slideToggle(500, function() {
                $mainContent.hide().load(newHash + " #guts", function() {
                    $mainContent.slideToggle(500, function() {
                        $pageWrap.animate({
                            height: baseHeight + $mainContent.height() + "px"
                        });
                    });
                    $("nav a").removeClass("current");
                    $("nav a[href="+newHash+"]").addClass("current");                       
                });
            });
    };        
});    
$(window).trigger('hashchange');
reloadMask();

});

  • 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-28T01:00:06+00:00Added an answer on May 28, 2026 at 1:00 am

    I figured it out!! Still buggy on some scripts, but it works. I’ve added comments to a portion of dynamicpage.js script below. Enter your new scripts there and it will re-fire them on content load.

    $(window).bind('hashchange', function(){    
        newHash = window.location.hash.substring(1);        
        if (newHash) {
            $mainContent
                .find("#guts")
                .slideToggle(500, function() {
                    $mainContent.hide().load(newHash + " #guts", function() {
                        $mainContent.slideToggle(500, function() {
                            $pageWrap.animate({
                                height: baseHeight + $mainContent.height() + "px"
                            });
                        });
                        $("nav a").removeClass("current");
                        $("nav a[href="+newHash+"]").addClass("current");
    
                        //RE-FIRE OTHER SCRIPTS HERE
    
                    });
                });
        };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to construct a data frame in an Rcpp function, but when I
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I want to show the soap response to UIWebview.. my soap response is, <p><img

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.