How to get current row and/or cell id of my custom widget?
Hello,
I an a newbie on your widget development and while going through your great guides everything works fine, I need to get (for JS variable) the cell id where my widget exists.
The output html starts with something like this:
<div class="panel-grid" id="pg-5-0">
<div class="panel-grid-cell" id="pgc-5-0-0">
<div class="so-panel widget widget_dw-slick-slider-widget panel-first-child panel-last-child" id="panel-5-0-0-0">and I need to know the “pgc-5-0-0” value in order to select it via jQuery selector.
How I can do this?
Thank you in advance,
Akis
This is our free support forum. Replies can take several days.
Need fast email support? Get SiteOrigin Premium
Replies
4Hi Devworks,
Select the intended widget (via a click() or some other event), and then select get the id of the row via parent. As an example (please ignore the lack of an event),
$('.so-widget-sow-hero-default-1e6da3885c0f').parent().attr('id');Thank you! That is the way I did :)
Hi Devworks,
Great to hear. Is there anything else I can help you with today?
Thank you for your help and kindness. I am fine.
Replies on this thread are closed.
Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.