jQWidgets Forums

Tagged: , ,

This topic contains 2 replies, has 2 voices, and was last updated by  GrantM 11 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Cannot Get Target ID #51314

    GrantM
    Participant

    This is my HTML

    	
    <div id="module-menu" class="draggable-demo-nav"></div>
    
    <div id="grid-wrapper">
    
      <div class="grid-row"> 
        <div class="grid-window"> 
          <div class="chart" id="chart1"></div>
        </div>
        <div class="grid-window"> 
          <div class="chart" id="chart2"></div>
        </div>
      </div>
        
      <div class="grid-row"> 
        <div class="grid-window">
          <div class="chart" id="chart3"></div>
        </div>
        <div class="grid-window"> 
          <div class="chart" id="chart4"></div>
        </div>
       </div> 
    
    </div> 
    

    I have a menu (#module-menu) of draggable options (.module-menu-option), and a target grid (#grid-wrapper) with 4 windows (.grid-window). Contained within them are the charts i want to populate that havent been so yet. Depending on what is dragged over, i want it to then populate that unique chart position with content based on the dragged option. The problem is, i dont know how to get the target window id to then populate that target.

    I have tried mouseover event but when you are dragging an item it doesnt work. When i try ‘event.args.target’ is uses the dragged item rather than the target. Does anyone know a solution?

    Thanks

    I have tried using a mouseover event on the

    Cannot Get Target ID #51322

    Peter Stoev
    Keymaster

    Hi GrantM,

    If you use jqxDragDrop, use the dropTargetEnter to identify the target. Example: http://jsfiddle.net/jqwidgets/Q29wx/

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Cannot Get Target ID #51378

    GrantM
    Participant

    Your reply helped me work it out, thank you.

    I was using “event.args.target.id” instead of “event.args.target[0].id”

    Thanks for your help.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.