2

I have a iframe in one of the jQuery ui tabs opened which has a button on click of which i need to switch to another tab

I tried using

$( "#tabs" ).tabs( "select" , 1 )

But it seems that I can not access the tabs outside iframe

Sangeet Menon
  • 9,555
  • 8
  • 40
  • 58

2 Answers2

3

Try

window.parent.$("#tabs").tabs("select",1);
Hardik Bhalani
  • 863
  • 2
  • 8
  • 24
0

You should tell your function to look at the parent of the iframe

$("#tabs", parent.document.body).tabs( "select" , 1 ); 
Nicola Peluchetti
  • 76,206
  • 31
  • 145
  • 192