1 With that goal, I have the following 'encapsulation', (see code). Is it a valid approach?
I'm putting event triggered scripts in their own functions.
2 In function LeftMargin(), why won't the selector for where to load the page work?
The page loads over/in place of the index.html page.
What's crazy, is the first line in the function works! But when I click a link it ignores the tag.
Thank you Talki, but it's still not working right.
I'm getting: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. (12:41:50:944 | warning, deprecation)
at https://code.jquery.com/jquery-1.12.0.min.js:4
whenever I 'run project' in netbeans, so I wonder if that's messing things up. I suspect so.
No change to my index.html page from what I posted yesterday.
It also says Uncaught Error: Syntax error, unrecognized expression: a[href^=http://] (12:41:51:099 | error, javascript)
So I'm stuck until I get past that I guess. This is the latest jquery too!
Ralph
ASKER
This was the key. I went looking for that very answer in a book I have, but it did not include quotes...
Now I know.
The remaining 'Synchronous XMLHttpRequest on the main thread...' error is still happening though.
Time to look that up too.
You are welcome. I was not seeing an error in the code I mocked up for this but I did not go beyond the match on the a[href^="http://l"] part.
Ralph
ASKER
No, what you provided works great. That error appears to be a Chrome and or jQuery library thing. Fortunately it's not hanging me up.
-- -- --
Your solution got me going on the left and right margin.
On the left margin, DIV 1 I can load a page into DIV 2 there, and on the right margin I can load into the parent (index.html) page's DIV.
Now I'm one level deeper in DIV 2 on the left and need to load into index.html's center DIV again.
I'll submit another Q for that now.
I think you have to use
$('a[href^=http://]').on("click",
or
$( document ).on("click", "a[href^=http://]", function(){
instead of
$('a[href^=http://]').click(funct
greetings
Talki