Skip to main content


The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 865 total)
  • Author
  • in reply to: line with thicker end on css, how to? #206022

    Another route you can go is a div with a radial background. You can adjust the height/width and gradient very easily this way. And it’s a bit more backwards compatible.

    Here is a good website for generating background gradients:



    You are a wizard Doc.


    @TheDoc, ultimately I want it to move, pause, move to a new location.

    If I have to use animations then I will.

    I don’t know much about css animations. Do you know how to do it with animations?


    Ok, here is a of a simple click on a div. It move and rotate the div.

    What I want to do is as the end of that transition, pause, and then change the height and rotate again.

    What I can’t do is make it stop, and then adjust the top/left/rotate again inside the same effect.

    I know I can do this with jquery animate on the click event, but I’m trying to do it just by switching classes on the element.

    Can this be done?

    in reply to: Allow user to click button once per day! #178580

    I agree with Alen. Create a text file on the server and save the IP address of the people who submit the form and check the list when the user tries to submit.
    You’ll also have to save the time the user submitted the form so if they’re over the 24 hour period it will reset the timer

    in reply to: Try/catch inside JQuery $.ajax call #176369

    Scope is scope. If a variable doesn’t work, try/catch won’t either.

    I think code pen automatically intercepts and returns success for any Ajax request used without actually sending it out. Probably to prevent any weird hacking tricks.

    I would suggest making your own internet. With Blackjack. And Hookers.

    in reply to: appending stylesheet on window resize #176268

    Well… if you really CAN’T use media queries, then I wouldn’t go the route you’re trying to go.

    The biggest problem after attaching a styling sheet, is removing it when sized back up.

    What I would do instead which is much easier is on window resize change a class on the html or body tag. For example: sm, med, lrg, xl.

    That way, you can have ALL your css on the same style sheet and target different sizes

    div {
    } div {

    in reply to: Try/catch inside JQuery $.ajax call #176266

    I believe the reason why your try/catch doesn’t work is because code the Ajax success/error callbacks are outside the scope of the try/catch. The success/error callbacks can’t even read variables stated outside the Ajax call.

    Here is an example:

    So how do you better track what function sends out errors?

    I haven’t used it before but I believe you can use .ajaxError() to help track these things. Here is jQuery’s page on it. Maybe it’ll help you out.

    in reply to: Chat2 #175430

    Do you have a live code example of what you’ve tried to implement?

    in reply to: Chat2 #175429

    Unless we can see your code, we can’t help

    in reply to: Stickem + 100% height #175428

    Do you have a live code example of your work?

    in reply to: Parallax scroll effects…not background scrolling #173344

    Commenting here as a future reference (I don’t know why we can’t “save” posts. It’s a learning website. I’m looking at you Chris!)

    Seriously though, the best way to really learn the ins and outs of parallaxing, is to just try and build a site that parallaxes. This is one of the few instances I suggest doing it before trying to learn it. Here was my first shot at it a couple years ago. The code is crap but I’ve gotten better at it with time.

    (Also first time with a loading screen which sucks too, haha)

    in reply to: jQuery plugin help #173209

    Have you ever heard of a “Bool” type variable?

    A Bool type variable is a variable that is equal to only True or False. Here is an example using what you posted in a “Slider” type of plugin

     var defaults = $.extend ({
       slide:  "horizontal",
       thumbnails : true
     }, options);

    In the above case, which is hopefully easier to understand, are some default options for a slider plugin. 1st option is “slide” which equals “horizontal”. “slide” could equal lots of things like “horizontal”, “vertical”, “diagonally”, etc. so we store it as a “String” type variable.

    But for thumbnails, we either have them or we don’t, so we use a “Bool” type.

    Later on we can do something like this:

    // ... plugin code
    if(thumbnails) {
      // ... add thumbnails to slider code
    // ... more plugin code

    If thumbnails is true, the thumbnail code is added, if it is set to false, it isn’t.

    Usually, when you use a Bool variable, you don’t “set” it to something or set something to it. You usually use it to test conditions and change what you do based on those conditions.

    Hopefully that made sense. Let me know if anything needs more explaining.

    in reply to: Stop scrolling background image after so long #172639

    I have 2 solutions for you.

    1. Off the top of my head there IS a janky way you can do it where you make an element (#checker) absolutely positioned in the top left that is 817px tall with a div after it which a container (#container) for the rest of the html, and you apply the background to the container div instead of the html tag. Then in your css you can do something like: #checker:visible ~ #container { background:blah}.

    So if the checker is visible then the container after it will change the background style. This is a pure css solution that doesnt use js and if it works it is probably the best solution performance-wise.

    If you can’t get it to work, let me know and I’ll write up an example.

    1. If you just want to edit your js. You need to add a second check to your IF statement. If scrollTop is greater or equal to 817, you add the background to the htm… BUT what if the html tag ALREADY has the background? Then you’re adding the background to the html tag which already has it.

    So something like if(jQuery(window).scrollTop() >= 817 && jQuery(‘html’).attr(‘style’) == ”)

    This means you only need to add it once and not a million times. Same thing applies to removing the background. Get it to only remove the background once, not a million times.

    This was a quick write up before heading home from work so I hope it makes sense. I’ll check back in tomorrow.

    in reply to: Using 'selected' with 'nth-child' #166715

    You cannot mix nth-child and classes on the same element.

    For your list items, you can either select by class, or nth-child, not both. I believe this is the route of your problem.

    In your case, your css selector will ignore the .selected class and just target nth-child elements.

Viewing 15 posts - 1 through 15 (of 865 total)