0

I need to know whether these function will work . since my html is inside of a iframe .

function removeClass(){
 $("#testjqtable").removeClass("mce-item-table");
}

function addClass(){
 $("#testjqtable").toggleClass("ui-table,ui-table-reflow");
}

since I tried it it gave an error

Omar
  • 32,302
  • 9
  • 69
  • 112
Piumal Chamath
  • 437
  • 3
  • 6
  • 13
  • 2
    This will help you: http://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe - your function names are not interfering with jQuery's so don't worry about changing them. – Joe Jun 08 '13 at 09:54
  • 1
    maybe names of functions are interfering with jQuery function names. change your functions name. – Omar Jun 08 '13 at 09:54
  • isn't it because it is inside of a iframe and I need to say that "hey capture the id inside of the iframe " ? – Piumal Chamath Jun 08 '13 at 09:55
  • @ChamZ - you can run into some issues when dealing with iframes (mainly the same origin policy). If the iframe source is on the same domain then there are some great solutions in the question I linked to. – Joe Jun 08 '13 at 09:56

0 Answers0