PHP webdeveloper and frontend developer



Scrollto element with an id selector using jQuery

Category : jQuery & javascript, HTML & CSS · No Comments · by Feb 5th, 2015

For example, if I have a button with an id “btn” and a form with the id “form” and I want to scrollto the form when I click on the button HTML:

    jQuery:

 

Scroll to top of page from within Facebook app

When within a facebook app you sometimes want to scroll to the top of the page but outside of the iframe which contains your app. To do that you use the following code in javascript:

 This will only work when your canvas height is set to “Settable”. By default 800px. You can make in settable in the app Dashboard…

visible area within the iPhone and iPad browser

Category : jQuery & javascript, HTML & CSS · No Comments · by Dec 7th, 2012

visible area in the browser on iPhone portrait320*356 visible area in the browser on iPhone landscape480*208  visible area in the browser on iPad portrait 931*768  visible area in the browser on iPad landscape1024*675

Get the value from radiobuttons with jquery

Category : jQuery & javascript · No Comments · by Apr 3rd, 2012

 

Allow only numeric input or disallow spaces with Javascript

Category : jQuery & javascript · No Comments · by Jan 15th, 2012

This is a very easy way to restrict users from inputting any characters other then numbers or restrict users from entering spaces in e.g. login and password fields. You can restrict other characters by adding the charcodes to the function. You can check the charcodes at cambiaresearch.com Usage: Load in the javascript file and add onkeypress=“return isNumberKey(event)” in the input tag to…

How to hide the facebook Like count

Category : jQuery & javascript, HTML & CSS · No Comments · by Jul 6th, 2010

What I do, is put a div on top of the like count which is absolutely positioned The css

 The HTML

 

Deselect all options in dropdown with jQuery

Category : jQuery & javascript · No Comments · by Jun 7th, 2010

Here’s how you deselect all the values in a dropdown with jQuery

 

How to force plaintext insertion on paste in tiny_mce

Category : jQuery & javascript · No Comments · by Feb 1st, 2010

A lot of client of mine seem to first type the text for their websites in a Word document and copy them afterwards in tiny_mce. Apparently tiny_mce copies the layout from Word or any other program. This causes the layout in the website to get messed up. I found a solution for this. You have to enforce pasting as plaintext which…

Force break instead of paragraph on new lines in Tiny_mce

Category : jQuery & javascript · No Comments · by Jan 22nd, 2010

Normally tiny_mce inserts a new paragraph when you hit return. You can make tiny_mce force a BR element on newlines instead of inserting a new paragraph. Normally you should utilize P tags instead of BR, so only use this when you have to! Usage:

 


s