dimanche 19 avril 2015

How to use jquery in WordPress page

How could I make this code to work in a WordPress page?





<!DOCTYPE html>
<html>
<head>
<script src="http://ift.tt/1xDNnh9"></script>

<script>

jQuery(document).ready(function($) {
$("a").click(function(){

$('#versie').text('Welkom '+ $(this).attr('data-name'));
});
});
</script>

</head>

<body>

<div id="div1"><h2>Selecteer de gewenste versie: <span id="versie"></span></h2></div>

<a href="#" data-name="2007">2007</a> | <a data-name="2010" href="#">2010</a> | <a data-name="2013" href="#">2013</a>

</body>
</html>



Aucun commentaire:

Enregistrer un commentaire