onedevteam.com onedevteam.com - 5 months ago 16
jQuery Question

Send child items in div to background with z-index, but still make them visible

I have bunch of those in a loop on my page:

<div class="row-container">
<div role="button" class="row plan-clicked" id="1">
<div class="col-xs-12 plan-content">
<div class="col-xs-1"><i class="fa fa-2x fa-users"></i></div>
<div class="col-xs-5">
Test plan 3
</div>
<div class="price col-xs-3 pull-right">Only 2999</div>

</div>
</div>
</div>


id="1"
changes for every iteration in a loop, and i have click event attached to every id in javascript.

Problem is, that click event fires only when user click "blank" space in div with id. When anything else is clicked, event is not executed.

I have tried to set z-index of
.plan-clicked
to
999 !important
and
.plan-content
to less than that, but it's still same. I tried setting
.plan-content
to -1, but in that case, it goes down and i can't see it.

How can i fix this?

Answer

Problem solved by replacing div <div role="button" class="row plan-clicked" id="1"> with <a href..>