Give data attribute to row not working
-
Im trying to add an attribute to a row with a specific class using .attr but nothing happens. Tried giving it to the nav-tag and it works, but when I try to give it to a .row div it doesn't. Anyone who has a clue why? Im not very good at JS.
my code:
$(document).ready(function(){
$('.row.light').attr('data-info', '222');
}); -
Hey!
Please use "jQuery" instead of "$"
as described here:
http://laytheme.com/documentation.html#custom-javascriptAlso document ready wont work, you will need to use the event "newpageshown" as described here:
http://laytheme.com/documentation.html#newpage-events -
@arminunruh Thanks a lot man :)
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com