Pyae Phyoe Shein
Pyae Phyoe Shein

Reputation: 13827

get parent frame height with jQuery

I want to get the height of parent frame with jQuery.

It's my orginal script

var iframeElement = parent.document.getElementById('FrmPatient'); 
iframeElement.style.height = 170;

I want to change this script to jQuery style. How to get that?

Upvotes: 1

Views: 8626

Answers (2)

Sachin R
Sachin R

Reputation: 11876

$('FrmPatient').parent().css('height', '170px');

Upvotes: 0

spinon
spinon

Reputation: 10857

You could try this:

$("#FrmPatient", parent.document).css("height", 170);

Upvotes: 3

Related Questions