1. #1
    Sencha Premium Member
    Join Date
    Jun 2012
    Location
    Auckland, New Zealand
    Posts
    6
    Vote Rating
    1
    walter.rumsby is on a distinguished road

      0  

    Default Answered: [4.1.0] Cannot toggleCls on document Element

    Answered: [4.1.0] Cannot toggleCls on document Element


    Ext version tested:
    • Ext 4.1.0
    Browser versions tested against:
    • FF 13.0.1
    • IE 9.0
    • Chrome 19
    DOCTYPE tested against:
    • HTML5 DOCTYPE
    Description:
    • Ext.getDoc().toggleCls() throws a JavaScript error.
    Steps to reproduce the problem:
    • Get the document element
    • Call toggleCls on that element
    The result that was expected:
    • CSS class would be added/removed to the document element (<html>) in the same way it would be added/removed to other elements
    The result that occurs instead:
    • JavaScript error
    Test Case:

    Code:
    Ext.getDoc().toggleCls('yellow');
    See this URL for live test case: http://jsfiddle.net/wrumsby/KgGTp/

    Operating System:
    • Windows 7 Pro

  2. This is the expected behaviour. getDoc() refers to the document, not the html element.

    You'll want to use:

    Code:
    Ext.getBody().parent().toggleCls('foo');
    // or
    Ext.getDoc().first().toggleCls('foo');

  3. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,791
    Answers
    451
    Vote Rating
    599
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    This is the expected behaviour. getDoc() refers to the document, not the html element.

    You'll want to use:

    Code:
    Ext.getBody().parent().toggleCls('foo');
    // or
    Ext.getDoc().first().toggleCls('foo');
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi