Targeting Checkbox/Radio that has been checked with JQuery

By: Ryan Wong at

I always forget how to target check box that has been checked when I need it most.

So I decided to make a blog post so I can get the answer really fast.

1
2
3
4
5
6
7
8
//find out selected value
var isChecked = $('#tag').is(':checked');

//get value
var getCheckedValue = $('#tag2:checked').val();

//target radio directly
var getRadioValue = $('#tag2 input[type="radio"][name="blah[]"]:checked').val();

Hope it helps.

Make MAMP version 3 use Port 80 on Mac OS

By: Ryan Wong at

Author: Ryan Wong

The Reason why MAMP won’t let you set apache or nginx on port 80 is because MAC OS already has apache installed and running on port 80.

So basically you have to turn it off and then set MAMP to port 80.

Heres what I did:

1
sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool true

This will stop apache from running. Now restart your computer.

If you type http://localhost in the browser and you don’t see a working page, then that means apache is down.

Next Set the Port for Apache to 80, Nginx to 81 and Mysql to 3306. Apache and nginx cannot be running on the same port.

Start MAMP afterwards.

Hope this helps you out.