javascript - Change element properties of different HTML document -


in index.html file, have 2 div objects:

<head>     <meta charset = "utf-8">     <link href = "elv.css" rel="stylesheet" type="text/css">     </head> <body>     <div id="goat">blue</div>     <div id="puthtml"><object id = "hmehtml" type="text/html" data="test.html"></object></div> </body> 

css:

#goat {     color:blue; } 

in div#puthtml page (text.html) loaded after click. want know if change css property of #goat on click? jquery or whatsoever? tried using document.getelementbyid try #goat element no avail.

here jquery function handle needs

$(document).ready(function(){    $('#hmehtml').click(function(){ // can use '#hmetml button' selec         //descendant button element, if there actual button in html        // load         $('#goat').css('color','red');     }); }); 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -