Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. You can show your websites in the critiques forum.
  2. It's possible to put a setTimeout in an each() function. What happens when you run that is that instantly there will be as many setTimeout() calls as there are <li> elements on the page, they all will fire at the same time exactly two seconds after .each() was called. What are you trying to achieve with this?
  3. Actually, the last rule in a statement does not require a semi-colon, it's just best practice to put one in case you intend to put another rule after it in the future.
  4. They're using CSS animations and probably some Javascript / jQuery
  5. Ingolme

    Nav tabs

    inline elements can't have a height. You can give a height to inline-blocks and blocks.
  6. Those aren't conditionals, they're bitwise operators << will move bits of the left operand to the left by the amount specified on the right operand. 1 << $len is equivalent to 1 * pow(2, $len) (see pow() ) but much more efficient because computers operate in base 2 naturally. The & operator operates in binary. It compares each 0 or 1 from a binary number with the 0 or 1 from another binary number and the result has a 1 if both of them were 1, 0 if not.
  7. First, indent your code properly. It's hard to read like that. Here, this is better: $(document).ready( function() { $("input:radio[alt-id='test-hide']").change( function() { if(this.checked && this.value == "Y") { $("div#other-questions").show(); } if(this.checked && this.value == "N") { $("div#other-questions").hide(); } } ); $("input:radio[alt-id='test-hide']").change(); }); It looks like you're using a custom attribute alt-id, it might not be the cause of the problem but if other solutions don't work I'd check it out. You should only use valid HTML attributes. You can make a custom attribute valid in HTML 5 by prepending it with data-. In this code you called change() a second time and it might be that it overwrote the previous change() event listener with nothing. Unless there's a good reason for it to be there you probably should remove that line. I can't pinpoint the problem more precisely without seeing the HTML that this Javascript is acting on.
  8. Your 404 page will need an absolute link to the stylesheet. You can do that by prepending the URL with a / to indicate that it's always relative to the site root and not the file's current location. <link href="/css/style.css" rel="stylesheet" type="text/css">
  9. Please make a new thread for your own questions. There are <meta> tags in HTML with an http-equiv attribute. No idea what you mean by "transcript tags"
  10. The concept of "layer" is an old Netscape thing. The best way to style a div is with an external stylesheet, not inline styles. See the difference between external stylesheets and inline styles here: http://www.w3schools.com/css/css_howto.asp
  11. The W3Schools example has multiple different formats while his code only had one file.
  12. Each browser supports different video formats. Support for MP4 isn't too great yet: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats You should have another <source> element with an OGG file for browsers that don't support MP4.
  13. If you want it to update in real-time PHP's not going to do it. Send the data to Javascript and have Javascript work with it. You can sort data alphabetically using the sort() function.
  14. What do you mean by "doesn't work"? Remember to call the function somewhere with myFunction();
  15. If your website requires a server-side language then you can't preview it in the browser with dreamweaver, it has to be hosted on a server that supports the language.
  16. This makes it really easy for vandals to just change anybody's password whenever they want. It is also really easy to hack with SQL injection. The MySQL library is deprecated due to security vulnerabilities, you should use MySQLi or PDO.
  17. You probably should read the W3Schools HTML tutorial from start to end, there's way too much to explain to you in one forum post. What you have in your code right now is referred to by developers as "Tag soup". Once you've learnt HTML and created a new page, pass your HTML through the W3C HTML validator frequently, because incorrect HTML will cause CSS and Javascript to not work properly.
  18. You need to learn CSS selectors. There are only two main things in CSS: selectors and rules. If you don't know how selectors work then you don't know half of CSS.
  19. It looks to me like the "OK" button isn't inside the form and is not submitting the form. The form will probably only validate fields if somebody tries to submit it.
  20. The code is working exactly as it should when I test it. What are you expecting it to do?
  21. Their password is never sent to them, that would be a big security vulnerability. It's not easy. Here's one tutorial: http://code.tutsplus.com/tutorials/creating-an-advanced-password-recovery-utility--net-4741
  22. A website is a compilation of web pages that are linked together, they may be generated by software or not. A basic definition of "software" as it's used today is any set of instructions executed by a computer. Web-based software is software that runs on a web browser (client-side) or software that outputs content to a web browser (server-side). Copyright protection for websites and web applications depends on the uniqueness of the content. Sometimes it's obvious and sometimes it's not, in the latter case it would have to be disputed in court because nothing's black and white in the law.
  23. Have you checked the browser's Javascript console for any errors?
  24. There is only one child node there, the <span> element. Inside the <span> element is one child node: a text node. What you need is to manipulate a string. You can only apply styles to HTML elements, not to text nodes. You can use substring() to get a portion of a string. // firstChild is the span// the firstChild of the span is a text node// the content of the text node is its node valuevar textContent = document.getElementsById("isdivNode").firstChild.firstChild.nodeValue;// Get all the letters in the string except the last two:textContent = textContent.substring(0, -2);
×
×
  • Create New...