Advertisement
Guest User

Untitled

a guest
May 28th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. jQuery(document).ready(function($) {
  2. var editorElement = '#postdivrich';
  3. var podsPrefix = /^pods-/;
  4.  
  5. function hideElementIfUnused(element, match, val) {
  6. if(match.test(val)) {
  7. $(element).hide();
  8. } else {
  9. $(element).show();
  10. }
  11. }
  12.  
  13. hideElementIfUnused(editorElement, podsPrefix, $('#page_template').val());
  14. $('#page_template').change(function() {
  15. hideElementIfUnused(editorElement, podsPrefix, $(this).val());
  16. });
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement