Tales of an IT Nobody

devbox:~$ iptables -A OUTPUT -j DROP

angular-ui-router – IE8 and nested states April 16, 2014

Just a quick tip, If you still have to maintain compatibility with IE8 (< AngularJS 1.3) – and you’re using angular-ui-router for nested views, the documentation for nesting states says you should use “<ui-view />” for your template for an abstract parent state:

Remember: Abstract states still need their own <ui-view/> for their children to plug into. So if you are using an abstract state just to prepend a url, set resolves/data, or run an onEnter/Exit function, then you’ll additionally need to set template: "<ui-view/>".

 

The problem is, IE8 doesn’t like “<ui-view />” – so instead, (I’d suggest this anyways), use:

 

 

2 Comments on angular-ui-router – IE8 and nested states

JQuery – Sparkline: Re-draw on resize / responsive sparklines August 8, 2012

I’ve been suckered in by the awesome JQuery Sparkline plugin – I won’t go over how it works or what it does, but rather a quick ‘fix’ for fixing issues with how the output deals with browser resizing. (Long story short, it doesn’t by default).

Here’s a visual of the issue I’m talking about with responsive/resizing layouts

 

Normal:

After resize:

 

The fix:

Assign your Sparkline initialization to a variable as a function.

Then call the function to intialize, and bind it to JQuery’s $.resize() method.

I also used a short setTimeout() to avoid excessive redrawing during the resize operation.

And voila!

 

5 Comments on JQuery – Sparkline: Re-draw on resize / responsive sparklines
Categories: Design purdy

JQuery UI tip: floated divs inside JQueryUI tabs December 1, 2010

There’s a somewhat confusing problem that can happen if you want to use a multi column (floated div) chunk of content for a tab in JQuery UI tabs.

Basically, the floats inside the tab container cause the tab container to lose it’s height, making your content appear outside of the tab box.

Let us assume our code looks something like this:

The problem is that the floats inside the tab container cause the tab container height to be incorrect (Shown via Firefox)

The solution to this, was to apparently make the tab container float as well, by adding a float:left; width: 100%; to the ‘myTabs‘ div; making the content all appear correct.

End result css:

12 Comments on JQuery UI tip: floated divs inside JQueryUI tabs
Categories: CSS Design php programming

Bullet train crash course for CSS October 5, 2009

One of the best zero-to-hero articles I’ve ever seen starting with basic CSS moving all the way to sprites; worth a look:

http://www.smashingmagazine.com/2009/10/05/mastering-css-coding-getting-started/

No Comments on Bullet train crash course for CSS
Categories: CSS Design purdy