1 Reply Latest reply on Jan 29, 2016 1:31 PM by ryan_pu

    dynamic content parent div

    ryan_pu Level 1

      I need to change this parent to position : absolute but I cant target it. problem.JPG

      Any one know how to target this parent div?

       

      function reward(draggedItemOrig,originSize)

      {

        var numItems = $(draggedItemOrig).length

       

        if (numItems == 1)

        {

       

        var rewardObj = myComp.getStage().createChildSymbol("reward", "Stage");

        $(rewardObj.element).parent().css({position:'absolute'});

        $(rewardObj.element).css

        ({

        left: originSize[2].left,

        top: originSize[2].top

        });

        };

      };

        • 1. Re: dynamic content parent div
          ryan_pu Level 1

          I swear I tried this earlier but it works now.

           

          function reward(draggedItemOrig,originSize)

          {

            var numItems = $(draggedItemOrig).length

           

            if (numItems == 1)

            {

           

            var rewardObj = myComp.getStage().createChildSymbol("reward", "Stage");

            $(rewardObj.element).css({position:'absolute'});

            $(rewardObj.element).css

            ({

            left: originSize[2].left,

            top: originSize[2].top

            });

            };

          };