Nasrul Hazim Bin Mohamad

Get All Public Holidays for Malaysia States


Get All Public Holidays for Malaysia States. Source grab from Office Holidays

System Development: Must Have 3rd Party Library


A list of useful libraries used for system development – such as uploading, sorting, beautiful alert messages.

So, you don’t have to stick to those old schools methods for all the above. ūüôā


Ply, beautiful alert messages and even you can customize for login or registration modal.

DropzoneJS, similar to WordPress uploading Media.

DropzoneJS, similar to WordPress uploading Media.


Sortable, useful when it’s come to sort out your staff list for instance, or probably you have a list of products need to be sort.

Website Development – Front-end


I’ve been working recently on what’s the basic / features used in most websites in 2015. Here is the list:

  1. Parallax
  2. Carousel
  3. Animate
  4. Smooth Scrolling
  5. Flat UI Design
  6. Nice & Clean Icons
  7. UI Framework
  8. JavaScript Library with their extensions
  9. Slider

From all of features above can be achieve by using following plugins/extension/library:

  1. Carousel – Owl Carousel
  2. Parallax – Parallax.js
  3. Animate – Animate.css
  4. Smooth Scroll – see my post here
  5. Fontello – include Font Awesome, Fontellico, etc.
  6. Ui Framework – Bootstrap, Foundation
  7. Slider – Light Slider

In 2016, I think most of the above still remain use.

A bit of reading just now Рprobably my next project will use Angular Material.



Year 2016, InsyaAllah, next year to be a year of sharing knowledge of what I’ve learnt so far. Following are the trainings I would like to conduct:

1. Mobile Apps Development with jQuery Mobile
2. Mobile Apps Development with Intel XDK (incoming)
3. API Development with Slim Framework (incoming)
4. PHP Basic / Advanced
5. Web Development with CakePHP 3 (incoming)
6. Web Development with Laravel 5 (incoming)
7. Web Development with Yii Framework 2 (incoming)
8. WordPress for Developers – Beginner Level
9. WordPress Theme Development
10. WordPress Plugin Development

Those status incoming, it’s the one I’m preparing the syllabus & materials, summarizing the process, and so on. Hope more things can be share other than mentioned above such as the tools I’ve used along the process of the development – Sublime Text 3, SQLYog, Putty, Git and so on

Slide in Elements



.slideanim {visibility:hidden;}
.slide {
    /* The name of the animation */
    animation-name: slide;
    -webkit-animation-name: slide; 
    /* The duration of the animation */
    animation-duration: 1s; 
    -webkit-animation-duration: 1s;
    /* Make the element visible */
    visibility: visible; 

/* Go from 0% to 100% opacity (see-through) and specify the percentage from when to slide in the element along the Y-axis */
@keyframes slide {
    0% {
        opacity: 0;
        -webkit-transform: translateY(70%);
    100% {
        opacity: 1;
        -webkit-transform: translateY(0%);
@-webkit-keyframes slide {
    0% {
        opacity: 0;
        -webkit-transform: translateY(70%);
    100% {
        opacity: 1;
        -webkit-transform: translateY(0%);


$(window).scroll(function() {
    var pos = $(this).offset().top;

    var winTop = $(window).scrollTop();
    if (pos < winTop + 600) {

Reference: Bootstrap Theme “Company”

jQuery: Smooth Scrolling

  // Add smooth scrolling to all links in navbar + footer link
  $(".navbar a, footer a[href='#back-to-top']").on('click', function(event) {

  // Prevent default anchor click behavior

  // Store hash
  var hash = this.hash;

  // Using jQuery's animate() method to add smooth page scroll
  // The optional number (900) specifies the number of milliseconds it takes to scroll to the specified area
  $('html, body').animate({
    scrollTop: $(hash).offset().top
  }, 900, function(){

    // Add hash (#) to URL when done scrolling (default click behavior)
    window.location.hash = hash;

Reference: Bootstrap Theme “Company”

WordPress: Custom Post Type Slider


Getting Light Slider

Download Light Slider here.

Then extract the content, copy the img, js and css in src directory into your WordPress Plugin folder.

Include Light Slider JavaScript & CSS

wp_enqueue_style( 'light-slider-css', plugin_dir_url( __FILE__ ) . 'css/lightslider.css', array(), $this->version, 'all' );
wp_enqueue_script( 'light-slider-js', plugin_dir_url( __FILE__ ) . 'js/lightslider.js', array( 'jquery' ), $this->version, false );

Add Some Padding to the item and set link to white

<style type="text/css">
  .lslide {
    min-height: 250px !important;
    padding-left: 50px !important;
    padding-right: 50px !important;
    padding-top: 25px !important;
    padding-bottom: 25px !important;
  .lSSlideOuter .lSPager.lSpg > li a {
    background-color: white !important;

Getting posts

$posts = wp_get_recent_posts( ['numberposts' => 5,'category_name' => 'Announcement'], OBJECT );

The View Part

<?php $index = 0; ?>

<ul id="light-slider">
  <?php foreach ($posts as $key => $value): ?>
      <h4 style="color:white !important;font-style: bold !important;"><?= $value->post_title; ?></h4>
      <p style="color:white !important;"><?= strip_tags($value->post_content, ['p','span']); ?></p>
      <a href="<?= $value->guid; ?>" style="color:white !important;text-decoration: underline;float: right;"><?php echo (get_locale() != 'ms_MY') ? 'Read More':'Baca Lagi'; ?></a>
    <?php $index++; ?>
  <?php endforeach ?>

Final Part: initialize the Light Slider

jQuery(document).ready(function($) {




WordPress Post Slider available here

Bootstrap Studio: Demos


Bootstrap Studio, is a powerful web design tool for creating responsive websites using the Bootstrap framework.

Here are some screen shots that I have when working with it. An awesome desktop application, recommended for frond-end developer, reducing time spent for front-end development.



Columns Sizing

Columns Sizing

Options for Columns

Options for Columns

CSS Panel

Similar to Chrome Developer Tools CSS Panel

For Dekstop

For Dekstop

The Files

The Files

The Files

The Files

For Desktop

For Desktop

For Mobile

For Mobile

Source Code

Clean Source Code Generated

Here are some samples that I’m able to create with Bootstrap Studios. Hope you guys enjoy it.

Source code available here

  1. Carousel (component available in BS 1.0.9)
  2. Simple Login

Here are the summary from my experience using Bootstrap Studio:

      Reducing time spent for front-end development
      Doing two job at one time – design & write codes
      Lightweight and easy-going UI

Anyways, before you consider to buy Bootstrap Studio, please make sure that you’re understand how HTML5, CSS3, JavaScript works, and of course Twitter Bootstrap itself, else, you might get confusing or too dependent with the tool.

Happy Bootstrapping!

Training: Web Mobile Application Development (Basic / Intermediate) – INTIM – August 2015


Training: Web Mobile Application Development (Basic / Intermediate)

Location: INTAN Kampus Wilayah Timur (INTIM), Kemaman, Terengganu

Date: 17th – 20th August 2015


Training Materials:

  1. Web Mobile Application Starter Kit –¬†
  2. Basic Android Configuration –¬†
  3. API Template –¬†

Important Articles:

  1. HTTP Methods for Restful Services –
  2. Android Configuration –¬†
  3. Chrome Device Mode –¬†


jQuery Mobile: Set Selected Item for jQM Select


There’s a minor different how to set selected item in drop down list in jQuery Mobile. We can’t set by using standard jQuery $().val(value);. Here the workaround

$("#selector option[value='your-value']").attr('selected', 'selected');  

Reference: Is there a way to set the selected value in JQM select?