A Portfolio and blog for Mustafa Kurtuldu


Responsive Type

A jQuery plugin with the Golden Ratio

It seems a lot of dedication to responsiveness has been given to images and with typography ignored some what.

Design is sometimes subjective but we do have some rules that we can abide by; for example with body copy we should never have more than 100 characters per line as readers would find it harder to track the next line of text.

One tool I have used for a while now is the wonderful Golden Ratio Typography Calculator by Chris Pearson which …

DT-phpAccordian, a simple Accordion menu

With PHP, JSON and jQuery


This code was written a long time ago, and may no longer works on my serve.

Finally posted this code to create a simple accordian with PHP, JSON and jQuery based on a dev test I did for LoveFILM. You can get the code from github or simply look at it below. I also posted it to gist too so you can see each file example and a working demo aswell!.

First up the PHP

I added comments in the code to explain whats what. WE add the JSON parser …

What I was trying to figure out is how can you check if a table (or a div) that has a parent div with CSS overflow:auto applied to it and has started to horizontally scroll with JavaScript/jQuery.

Seems that the scroll() API in jQuery only checks if the event has been triggered and not if it has a visible scroll.

Then I found element.scrollWidth. All I had to do is check if the scroll width is greater than the container width1 and BOOM. Pretty …