iframes, parent and child documents
Hello:
I'm putting some finishing touches on my website. One is to insert links from one part of the page/site to another part. For example:
At this point I'm trying to get a button on a parent document to add and remove classes of an element in a child iframe. I've successfully moved focus to the iframe, but can not change classes of the child element. Following is my syntax:
- $('.ref_bttn').click(function()
- {
- $('#client_content').hide();
- $('#ref_content').show();
- $('#client_tab').removeClass("selected");
- $('#ref_tab').addClass("selected");
-
- // commands work great until this point. The following elements - by id - are in the child iframe. Their 'selected' classes are NOT changing.
- $('#PIAW_lttr',ifrm.document).removeClass("selected");
- $('#Grad_lttr',ifrm.document).addClass("selected");
- });
What am I doing wrong with my syntax???
Thanks Much - Pavilion