mercredi 4 mars 2015

Implement iris color picker


I create a plugin, and want to implement iris color picker on wp dashboard for my plugin, how to implement to my plugin? How to enqueue jquery and jquery-ui? I try to upload jquery and jquery-ui on my plugin folder but not work...



<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
<script src="path/to/iris.min.js"></script>
<script src="path/to/my/javascript.js"></script>

<input type="text" id='color-picker' value="#bada55" />

<script>
jQuery(document).ready(function($){
$('#color-picker').iris();
});
</script>




Aucun commentaire:

Enregistrer un commentaire