Jump to content

Catfish

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Catfish

  1. Catfish

    localhost

    That's the beauty of FireFTP. you just edit your file and save it like you would locally. FireFTP recognizes when it's changed and uploads it automatically. By the time you've changed window to the browser to test it, it's uploaded.
  2. Catfish

    localhost

    Yes it is possible, but I found it is better to develop on the web host because their settings or version may vary from what you have on your machine and this can cause problems. For instance, I wrote an algorithm to encypt saved data that used a timestamp from the data's record. Worked good on my machine, then when I merged it all onto my webhost, the encryption/decryption algorithm didn't work with pre-encrypted data because of locale differences. It was really my fault for not writing an algorithm that checked for that, but it was a pain none the less. I use a plugin for Firefox called FireFTP. You can make a profile to log into your webhost FTP, into the directory your website is in and then associate your favourite code editing program (I use Notepad++) to your PHP/CSS/HTML files. You can open your files directly from the web host, edit them locally on your machine and when you save them or exit the editor FireFTP uploads them ready to use.
  3. Hi there, I have been going through the jQuery guides on w3schools and came to a point where I wondered about the conventions for different brackets used in the guides. http://www.w3schools...ery_effects.asp Up until the section on jQuery Custom Animations, all function defitions were written like: $(selector).fadeTo(speed,opacity,callback) where no brackets were placed around the parameters for functions. For the animate() function, this changed: $(selector).animate({params},[duration],[easing],[callback]) At first I thought this meant the guide was detailing that the parameter params was required by using curly brackets { } and the other three were option using square brackets [ ].But then as I read on, I noticed the code had the curly brackets in it: <script type="text/javascript">$(document).ready(function(){ $("button").click(function(){ $("div").animate({height:300},"slow"); $("div").animate({width:300},"slow"); $("div").animate({height:100},"slow"); $("div").animate({width:100},"slow"); });});</script> So then I wondered, why are the square brackets there? Are there any conventions used in the w3school guides for syntax like this? I guess maybe not because with many languages a single convention might not fit all? Also, I couldn't find this outlined in the jQuery guide, but when passing arguments to a function, what are the rules in jQuery for using quotes? So far from teh guides the impression I get is, "numbers - don't use quotes. everything else - use quotes." Is this correct?
×
×
  • Create New...