Jump to content

Day

Members
  • Content Count

    53
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Day

  • Rank
    Newbie
  • Birthday 09/26/1989

Previous Fields

  • Languages
    HTML, CSS, JavaScript

Profile Information

  • Location
    Texas
  • Interests
    Web Development, UX Design, Writing, Table Tennis
  1. Well just incase anyone is interested, I thought about it more and changed my approach. To reiterate, the goal was to change specific lines of code with something else based on which subdomain your on. so for example: on www.example.com show "WWW Heading" on sub1.example.com show "Sub 1 Heading" on sub2.example.com show "Sub 2 Heading" the 3 ways I could think of for doing this were: Option 1: create an array for the original string and one for each sub domain: var original = [ 'WWW Heading', 'img/www/img.png'];var sub1 = [ 'Sub 1 Heading', 'img/sub1/img.png']
  2. Hey all, Is there anything wrong with using a string for a object property name/key? for example: var swaps = { 'this' : 'that' } My goal is to create an object containing code that needs to be swapped based on certain conditions and I'd like to avoid having to loop through 2 arrays or objects to find the swap with a matching index. Thanks in advance!
  3. So I've never made retina images or any images that have more than one size, but when I forgot what size favicons were I looked it up and found pages saying to make multi-layered or multi-resolution favicons. I read a few tutorials and most mention using an online tool. That's great, but I'd like to understand more then just how to upload an image to a website and download my .ico file. Can anyone explain how to make multi-layered favicons with Photoshop? Do I just have each size on a separate layer? Do the layers need to follow a specific naming convention? Is this the same way retina images
  4. Oh I didn't test it (I should have) I just assumed I was doing something wrong when it got color coded as a regular expression.
  5. I'm trying to create an equation and would prefer not to split it into different variables. Is there a way to divide twice on the same line and avoid created a regular expression? example: var eq = (5/5)/(5+5); Thanks,
  6. If your looking for a hobby and enjoy coding then PHP/SQL may be the way to go, but if your aim is to get a career than the quickest route is to learn HTML and CSS as Ingolme mentioned. But these skills alone will make it hard to compete in the workforce unless you learn how to design in Photoshop as well.If you really dedicate a solid year to learning HTML, CSS, Photoshop, and best practices, I would then look for a job as a web designer at big corporation. Where I'm from in the states, small agencies will pay web designers $25-$45k/year, but at the big company I work for, they start web desi
  7. Awesome! Thank you. I didn't realize I could use 'this' here. I already had some other functions, activate() and deactivate() for another part that I am reusing. This is what I ended up with: for (i=0; i<_fsMenuItems.length; i++) { _fsMenuItems[i].onclick = activateMenuItem;}function activateMenuItem() { for (i=0; i<_fsMenuItems.length; i++) { deactivate(_fsMenuItems[i]); } activate(this);}
  8. I'm adding onclick events to an array of elements and each one should get the .active class after being clicked. I've got 2 ways to make it work, but can someone help me to understand the difference between the 2? And also let me know if there is a better option? for (i=0; i<_fsMenuItems.length; i++) { // Option 1 (function(index) { _fsMenuItems[index].onclick = function() { _fsMenuItems[index].className += ' active'; } })(i); // Option 2 _fsMenuItems[i].onclick = (function(index) { return function(){ _fsMenuItems[index].className += ' active'; }; })(i);} Thank you!
  9. I'm glad my curiosity led me to open up this thread. Hadien and justsomeguy, you made something that seemed so complicated very simple and easy to understand. Thank you.
  10. While it wouldn't actually watermark your images or stop people from saving the images without the water mark on them, it is possible to place the watermark over top the image by making the following changes: $blog_query = " SELECT blog_id, blog_picture_url, blog_title, blog_message, blog_created_date, blog_edited_date, blog_userid FROM blog ORDER BY blog_id DESC LIMIT 5 "; $blog_result = $mysqli->query($blog_query); // If bigger than 0 if ($blog_result->num_rows > 0) { echo "<div class='home_blog_wrapper'>"; // Wrapper echo "<div class=
  11. it looks like the images are already centered in their parent div: "ch-info".
  12. This is true for all web technologies, but take the time to really understand the vocabulary. It helps to better follow any tutorials/explanations and helps when trying to search for answers/resources or ask for help.
  13. Or if you want to keep your js and styles separate. After you get the value you can add a class such as 'greenRow' with a transition property and then remove the class. The transition will create the effect but only in browsers that support it.
  14. What he said ^But on another note. That Twitter logo goes against Twitter's brand guidelines.Might be worth looking in to: https://about.twitter.com/press/brand-assets
×
×
  • Create New...