maxmitch
maxmitch

Reputation: 277

JQuery to make an item have a Shadow

The jquery to make an item have a Shadow (http://syddev.com/jquery.shadow/) doesn't seem to be working. This is what I have tried:

<link rel="stylesheet" type="text/css" href="jquery.shadow.css">       
<script src="jquery.shadow.js"></script>
<script src="jquery-1.5.min.js"></script>

<script>
    $('#SHADDOW').shadow({type:'sides', sides:'vt-2'});
</script>

<tr>
    <td><a href="http://burdu976.com/" id="SHADDOW" target='_blank'><img src="Photography8.png" id="SHADDOW" width="700"class="lazy" height="525" /></a></td>
</tr>

Upvotes: 1

Views: 89

Answers (3)

Caner Akdeniz
Caner Akdeniz

Reputation: 1862

Are you storing the script files locally or using some other website to call the .js files? It seems like you are storing them locally right now.

Upvotes: 0

zzzzBov
zzzzBov

Reputation: 179046

The item doesn't exist in the DOM when the script is executed, wrap the code in a document.ready handler so that the DOM is loaded when the code is called.

jQuery(function ($) {
    $('#SHADDOW').shadow({type:'sides', sides:'vt-2'});
});

Also, the plugin needs to be included after jQuery has been included:

<script src="jquery-1.5.min.js"></script>
<script src="jquery.shadow.js"></script>

Be sure to check that the path to the included files is correct.

Upvotes: 6

Steve
Steve

Reputation: 8640

Doesn't look like you are including jquery.shadow.js

And you load them in the wrong order too... it should be:

<script src="jquery-1.5.min.js"></script>
<script src="jquery.shadow.js"></script>
<link rel="stylesheet" type="text/css" href="jquery.shadow.css">       

in addition to the fix that @zzzzBov mentions in his answer.

EDIT: Looks like @Eskimo edited the original question and it now includes jquery.shadow.js. I don't know if that edit to the original question is correct, as the OP might not know to include that JS file.

Upvotes: 1

Related Questions