Issue #1627Opened December 4, 2018by SeongwoonHong0 reactions

[Question]: $('.gjs-trt-traits') is null (trying to have 'Settings' sector under the style)

Question

Code SnippetTEXT
Hi,
I'm using webpage preset and trying to have Settings sector under Style like the demo by doing this (exactly the same as demo.html) but the problem that i have is $('.gjs-trt-traits') this is null therefore, if I toggle 'Settings' under Styles, it is empty. Please let me know..Thank you!


    var traitsSector = $('<div class="gjs-sm-sector no-select">'+
    '<div class="gjs-sm-title"><span class="icon-settings fa fa-cog"></span> Settings</div>' +
    '<div class="gjs-sm-properties" style="display: none;"></div></div>');
    var traitsProps = traitsSector.find('.gjs-sm-properties');
    traitsProps.append($('.gjs-trt-traits'));
    $('.gjs-sm-sectors').before(traitsSector);
    traitsSector.find('.gjs-sm-title').on('click', function(){
      var traitStyle = traitsProps.get(0).style;
      var hidden = traitStyle.display == 'none';
      if (hidden) {
        traitStyle.display = 'block';
      } else {
        traitStyle.display = 'none';
      }

Answers (2)

lock[bot]December 7, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.