ok since you seem to be pretty well versed in the ways of jquery, i'm attempting to keep my functions going after the first call. Atm, i'm using a panel that's hidden until it's called upon from someone clicking a link. Then that link causes it to become visible, it goes over the text, then it displays a section of the target page inside of it. Well, for some odd reason jquery has no idea how to intercept said links from inside of this panel or if i insert the new page onto my current page with teh scripts still outside of it. I have a link inside of said panel to the privacy policy for example, and i wnated to it to just load, but apparently it's not getting intercepted by my code which is on the actual page still. Then on the second part, i was going to move part of the register page onto the main page as to not have to load an entire page again, just the registerstration form and put that instead of the paragraph describing the game. But, the main problem with this is, even though i have made sure that my <script> tage is outside of that paragraph which is getting replaced it's not interecepting the link clicking as it should. it works just fine on any one page, but when i attempt to make it do it once more after it's loading once, it just fails and dies. I don't understand this and it's confusing me. Someone said to use the live() function to attempt to make this bit of code stick with it.
<script>
$(document).ready(function () {
$('a[rel="tos"]').click(function (e) {
e.preventDefault();
$('#reusepanel').load('main/tos.php #tos', function () {
$('#reusepanel');
reveal1();
});
});
$('a[rel="login"]').click(function (e) {
e.preventDefault();
$('#reusepanel').load('main/login.php', function () {
$('#reusepanel');
reveal1();
});
});
$('a[rel="privacy"]').click(function (e) {
e.preventDefault();
$('#reusepanel').load('main/privacypolicy.php #privacy', function () {
$('#reusepanel');
reveal1();
});
});
$('a[rel="reg"]').click(function (e) {
e.preventDefault();
$('#main').load('main/register.php #main', function () {
$('#main');
});
});
});
if ('a[rel="reg"]'){
result = "#main";
urllink = "main/register.php";
containerid = "#main";
}
if ('a[rel="priv"]'){
result = "#reusepanel";
urllink = "main/privacypolicy.php";
containerid = "#privacy";
}
if ('a[rel="login"]'){
}
</script>
now then, iw as going to set all of those click interceptors as one function and put it into my functions.js file but at the moment, it's still not working even on the page after i load in something else. It's as if it's just refusing to work at all. The other odd thing, is that i'm unable to force a fragment to override the current form's data but that's just adding int a little bit of code and nothing big. As in taking a fragment called #main and attempting to force it to overide the current #main on the current page. But that just adds in another bit of code and nothing big.