javascript - access an element through CSS Path from outside of iframe -
i want access dom element through css path inside iframe. following direct css path:
var dompath = "html body div div div div div div div ul li a:contains('parks')"; $(dompath).click();
the above line working fine if opening page without iframe.
i want open same page inside iframe , want trigger click on above element outside iframe. have tried in way, not working.
$('#scaled_frame').contents().(dompath).click();
how can perform click action outside.
best regards,
try this: $('#scaled_frame').contents().find(dompath).click();
Comments
Post a Comment