Sha256: 1c1ac2cf1f1140b3d2b34c1c99d465468811a3b4ee3ee9b916e74e0f931a89b4
Contents?: true
Size: 1.23 KB
Versions: 5
Compression:
Stored size: 1.23 KB
Contents
// Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. //= require jquery //= require jquery_ujs //= require twitter/bootstrap //= require ./admin/app $(function () { var area = $('.html-text-area')[0]; if (area) { CodeMirror.fromTextArea($('.html-text-area')[0], { lineNumbers: true, mode: 'xml', theme: 'twilight' }) } $('.page-with-children').click(function () { if (!$(this).hasClass('active')) { $(this).addClass('active'); $('i:first-child', this).removeClass('fa-chevron-right'); $('i:first-child', this).addClass('fa-chevron-down') $('#' + $(this).attr('id').replace('-page', '') + '-children > td > div').slideDown(); console.log($('#' + $(this).attr('id').replace('-page', '') + '-children > td > div')) } else { $(this).removeClass('active'); $('i:first-child', this).removeClass('fa-chevron-down'); $('i:first-child', this).addClass('fa-chevron-right') $('#' + $(this).attr('id').replace('-page', '') + '-children > td > div').slideUp(); } }) });
Version data entries
5 entries across 5 versions & 1 rubygems