Re: Can I make the click display property use transition?
Posted: Fri Oct 07, 2016 12:03 pm
....how? that's the funny thing about jFiddle, if you are not use to it, you see the code, but it doesn't show the jQuery to attach.
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
It does. Click the cog in the JS pane. At least in this case, though, the particular version of jQuery doesn't much matter. Whatever you're already using on the site is probably fine.simonmlewis wrote:....how? that's the funny thing about jFiddle, if you are not use to it, you see the code, but it doesn't show the jQuery to attach.
Code: Select all
<script type="text/javascript" src="//code.jquery.com/jquery-2.2.4.js"></script>
<script>
$('.faq-tile input').change(function(event) {
if ($(this).is(':checked')) {
$(this).parent().css('background-color', 'pink');
} else {
$(this).parent().css('background-color', '#F5F5F5')
}
});
</script>Code: Select all
<script>
var mydocument = function() {
$('.faq-tile input').change(function(event) {
if ($(this).is(':checked')) {
$(this).parent().css('background-color', 'pink');
} else {
$(this).parent().css('background-color', '#F5F5F5')
}
});}
</script>Code: Select all
$(document).ready(function() {
$('.faq-tile input').change(function(event) {
if ($(this).is(':checked')) {
$(this).parent().css('background-color', 'pink');
} else {
$(this).parent().css('background-color', '#F5F5F5')
}
});
});Code: Select all
$(function() {
$('.faq-tile input').change(function(event) {
if ($(this).is(':checked')) {
$(this).parent().css('background-color', 'pink');
} else {
$(this).parent().css('background-color', '#F5F5F5')
}
});
});Code: Select all
$(document).ready(function() {
// Stuff here...
$('.faq-tile input').change(function(event) {
if ($(this).is(':checked')) {
$(this).parent().css('background-color', 'pink');
} else {
$(this).parent().css('background-color', '#F5F5F5')
}
});
// More stuff down here...
});Code: Select all
...
<script src="//code.jquery.com/jquery-2.2.4.js"></script>
<script src="/assets/js/your-script.js"></script>
</body>
</html>