jQuery: disable autoscrolling to top when click on anchor

advertisement

jqueryIf u r building website with jQuery, it’s common if the browser auto scroll to top when user click on anchor element. This happen to me many times and i always forget how to disable the auto scrolling. Thus this post is being created for my own reference and for other developer 🙂

To disable autoscrolling to top when user click on anchor element, follow the steps below:

Continue reading jQuery: disable autoscrolling to top when click on anchor »

WordPress: add javascript event after widget save

advertisement

wordpressI’m writing a widget that uses color picker, whenever widget save the color picker will went missing. if i can add an event after the widget saved, then this problem can be solved easily. This is mainly because of the ajax call that occurred during the widget save. However, i can’t find any reference from the WordPress documentation. God bless, there jQuery come with some handy function that can be used as a work around to solve this problem 🙂

To add an javascript event after widget save, follow the steps below:-

Continue reading WordPress: add javascript event after widget save »

Contact Form 7: Clear all field except specific after submission

advertisement

wordpressJust had a job in WordPress and Contact Form 7. My client required some fields to have default value for all the time. However, whenever user submit the form, CF7 will clear all the field once the submission is successful. After some research, i manage to find a solution to retain the field value for CF7 after submission.

Contact Form 7 to clear all field except specific one after submission, follow the steps below:-

Continue reading Contact Form 7: Clear all field except specific after submission »