How to disable a div control?


  • I have two controls on my page.

    <div id="itemsListView" data-win-control="WinJS.UI.ListView" data-win-options="{ selectionMode: 'multi' }"></div>
    <div id="headerMenuButton"> // I do have addEventListener(click, ...) for this
    	<div id="text">My Header Button</div>
    	<div id="headerMenuChevron"></div>

    How can I disable those controls? When application loads some data I want it to be unclickable.

    Simple setting disabled attribute doesn't work.

    Thanks for your help,


    Thursday, May 16, 2013 7:37 PM


  • Seems there is no disabled property for div. Have a look at this link for a alternate solution.

    - Girija

    Thursday, May 16, 2013 7:46 PM