Since CSS3 no get parent Selector...i will do it manually by myself$('p').each(f …

goodmuyisgoodmuyis Posts: 112
edited December 2018 in CSS

Since CSS3 no get parent Selector...i will do it manually by myself

$('p').each(function() {
  var className = $(this).attr('class');
  $(this).parent().addClass(className);
})

Am sure our grandchildren will have a simple and better solution

Comments

Sign In or Register to comment.