Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

moxie

Members
  • Joined

  • Last visited

Everything posted by moxie

  1. This example could probably be adapted for your needs: var sections = 8; //number of sections var sectionSize = 360/sections; //degrees in each section var direction = Math.random()*360; //a random direction for(i=1; i<=sections; i++){ //is the direction within an area? if ( direction > (i-1)*sectionSize && direction < i*sectionSize ) { alert('directon:'+direction+' is in section:'+i); break; } } Hope it helps
  2. I think this would have to be done from a server level. If you're trying to calculate the bandwidth based on an already rendered page, the results would be inconclusive as if external elements like images and scripts are cached then they won't be downloaded from the server.
  3. Looks like the header for Content-Disposition is slightly wrong: try changing from: header('Content-Disposition: attachment; filename='.$path.$filename); to: header('Content-Disposition: attachment; filename="'.$path.$filename.'"');
  4. moxie replied to WDF's topic in Frontend
    If I was to do this I'd probably have an additional destination div and get the IDs of the elements you want rearranged put into an array. You can then sort based on name (you'd have to use a naming convention which can be sorted correctly, eg div1, div2, etc) and this could be done dynamically if they're placed in a wrapping div and you get the IDs of the wrapper's children. I'd loop through the array of IDs and append the destination div with the contents of the div to be moved, followed by removing the original element. It's not exactly an elegant solution but theoretically it should work. Hope that helps
  5. It's using a sprite for the background image and Javascript to change the background position. The spritesheet being used is this: http://www.smartusa.com/_assets/models/passion_coupe_colors.jpg Hope that helps
  6. Hi there, I think the problem is to do with the use of innerHTML which will expect a string to be passed. innerHTML will essentially inject an html string into the selected element: // Example document.getElementById("html").innerHTML = '<div id="test"></div>'; I haven't tested this but I'd say that the innerHTML in your script would cause an error which could result in nothing happening in your page. You may also need to change the setAttribute piece too: //from: $(":first").setAttribute(" style='overflow-x:hidden'"); //to $(":first").style="overflow-x:hidden"; I'm not 100% on this one though, my javascript is a little rusty. I hope this helps.
  7. Hey everyone, I'm new I'd say I'm more developer than designer these days, mainly working in PHP but I originally studied creative multimedia & specialised in Flash. Hopefully I'll be able to catch the design bug again & help some others out along the way.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.