CSS add text on top of image

March 28, 2014

Putting the image in as a background image of the wrapping div would be easier, but to add text on top of image or background image, position absolute needed.

PHP obtaining the next month, date-string parser

March 26, 2014

The correct way of obtaining next month correctly is by using “first day of next month” or using “last day of next month”. In normal case, user next month in php to obtain next month value doesn’t work as expected, but it skips to month after next month, Example: Output will be: March. Which suppose […]

jQuery check if element exist

March 17, 2014

To check the length of the selector, if it returns you something then the element exists else not exist. Use:


March 17, 2014

Some newer version of phpmyadmin by default when create field name not allow NULL. after added the field, we can use MODIFY command to change it default null. Mysql MODIFY command example:

FuelPHP CRUD – Orm find all where with or & and criteria

March 12, 2014

FuelPHP orm find all criteria with WHERE OR & AND is easy to achieve is we understand the concept behind and built the correct array. The documentation stated as below without multiple criteria such as ‘WHERE (status = “single” OR status = “married”) AND name = “superman” ‘ My success example is as below:

jQuery get checkbox value

March 12, 2014

You can I get a checkbox’s value in jQuery like this if you have set a class or id for it Without id For some reason: •$(‘#checkbox’).val() always returns on •$(‘#checkbox’).is(‘checked’) always returns false But, Returns the right checkbox state. Other way of retrieving checkbox’s value is

jQuery remove validation rules by event

March 12, 2014

You could use the rules(‘remove’) method to remove your rules dynamically. Something like this on any event. Use rules(‘add’) method to add the rules back just before submit example:

GIT delete or undo last commit

March 12, 2014

Delete or undo mean it is as if you did not want that commit and when you do a git push in the future, the changes will not push to the remote branch. If you created the changes and commit to local master repo, and you still want the changes, create a new branch before […]

jQuery Datepicker UI language translation implementation

March 11, 2014

There are already localized versions of the jQuery Datepicker. The datepicker includes built-in support for languages that read right-to-left, such as Arabic and Hebrew. http://jqueryui.com/datepicker/#localization For a multiple language website, the easiest way to do it is by loading the related language file which contain the range of rationalization options. After that set the datapicker […]

How to convert php array to javascript array

March 11, 2014

You can convert php arrays into javascript using php’s json_encode()* function: Example: To use the array, remember do JSON.parse(): To use the array, jquery $.each is easy to loop and retrieve the information: