is wrong with this script !!??????

  • carmen
  • Born
  • Born
  • carmen
  • Posts: 1

Post 3+ Months Ago

Can I wrong? I know I need a timeline, but did not do it. Can you help? I need a loading put on my blog, but I can not get it.
Mil gracias

<script type="text/javascript">
$ (document). ready (
function ()
($ (. Prel). each (function ()
($ (this). css ( "visibility", "hidden");
$ (this). load (function (){$( this). FadeIn ( "normal ");});
)
);
)
);
</ script>
<style>
. div (background-image: url (loading.gif);
background-repeat: no-repeat; background-position: center center;
border: 0px solid black;)
img (width: inherit; height: inherit;)
</ style>
<div class="div" style="width:100px;height:100px;">
<img class="prel" src="loading.gif" /> </ div>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • mk27
  • Proficient
  • Proficient
  • User avatar
  • Posts: 334

Post 3+ Months Ago

[EDIT] Just ignore this post unless you find me being inappropriately righteous entertaining

What's not wrong with this script? Either you know something about javascript that I don't know (easily possible, but I don't think so in this case) or you are going about this the wrong way. Do you use firebug or anything like that to detect errors? I'm pretty sure your syntax is bad from line 1 on down.

There is nothing wrong with being a "hack", but at a certain point, you are just going to bang your head against a wall if you don't take some time to learn basic syntax. Doing some basic tutorials, etc, may seem tangential to your desire to get a "loading" image for your blog, but on the other hand, it may make the difference between getting it done eventually and not getting done at all.

What you want to do is not hard, but you will need to provide more information about what triggers this event if you want advice. I think you have made it (much) more complicated than it needs to be...esp since these "complications" maybe just junk lines.

[COMEDY OVER]
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Posts: 2733
  • Loc: Nashville, TN

Post 3+ Months Ago

mk27, the script is jQuery. Perhaps you should head over and take a look for yourself.

carmen: Try $(".prel").each as your selector.
  • mk27
  • Proficient
  • Proficient
  • User avatar
  • Posts: 334

Post 3+ Months Ago

UPSGuy wrote:
mk27, the script is jQuery. Perhaps you should head over and take a look for yourself.


Okay! I stand corrected! All apologies to the OP. I see there is an $(AJAX) shortcut in there but I don't know JQuery or nothin'

:roll: MK

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 151 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.