SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Dec 2005
    Posts
    964
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery: Change css in iFrame?!?

    I'm trying to make a realtime script which changes some of the css in a page in realtime. I have done this within a parent page but now want to be able to change some values in a iframe with a page in same domain...

    This is how I did it within same page:
    Code JavaScript:
    jQuery("#bodycolor").attachColorPicker();
    jQuery("#bodycolor").change(function() {jQuery(document.body).css("background-color",jQuery("#bodycolor").getValue())});

    I have done something where I change some divs within my iFrame like this:
    Code JavaScript:
    jQuery("#mif").contents().find("#strDiv").html(s);

    Just dont know how to connect the dods...

    Please help and thanks in advance ;-)

  2. #2
    SitePoint Guru
    Join Date
    Dec 2005
    Posts
    964
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry... Found out!
    Code JavaScript:
    jQuery("#bodycolor").change(function() {jQuery("#mif").contents().find("body").css("background-color",jQuery("#bodycolor").getValue())});


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •