Hello I need this JQuery to run for the image bellow it. But here's the trick I need to select the image by it's alt, I can't seem to get the JQuery to select it
<script>
$('img[alt="800px-Red_Bull"]').onload = function() {
Pixastic.process(img, "desaturate", {average : false});
</script>
<img width="800" height="387" src=".../01/800px-Red_Bull.png" alt="800px-Red_Bull" title="800px-Red_Bull">
Your problem is not with your selector, it's that you're not using the load
event correctly.
Change your code to this:
$('img[alt="800px-Red_Bull"]').load(function() {
Pixastic.process(img, "desaturate", {average : false});
});
Try:
$('img[alt="800px-Red_Bull"]').load(function () {
Pixastic.process(img, "desaturate", {average : false});
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With