Ans. The type of a function is “function”. There are a lot of anonymous functions is jquery. $(document).ready(function() {}); $(“a”).click(function() {}); $.ajax({ url: “someurl.php”, success: function() {} });
Ans. It is a jquery plugin which enables us to connect a function to another function. It is like assigning a handler for another function. This situation happens when you are using any javascript plugins...
Ans. For editing files, I love the e texteditor. It basically started as a textmate clone for windows, but since then grew into something much greater. One of the features I can’t live without now...
Ans. I switched to Mac hardware around a year ago and I�m totally in love with it. All components work together nicely, and so far, I never had to return my Macbook Pro to the...
With jQuery UI 1.7 being released in the last few days, what do you see as the key parts of jQuery UI 1.7? What are you most proud of out of that release? Ans. The...
Ans. Although it’s a bit embarrassing, my first programming experience was trying to build a customized and skinnable mediaplayer with Visual Basic 6. This probably was around 1999 or so, and although the media player...
Ans. Download the latest jQuery library from jQuery.com and include the reference to the jQuery library file in our ASPX page. <script src=”_scripts/jQuery-1.2.6.js” type=”text/javascript”></script> <script language=”javascript”> $(document).ready(function() { alert(‘test’); }); </script>
Going back to our example, transitions can be delayed from the moment the trigger happens on screen. For example, let’s say we wanted the background transition to happen half a second after the link...
The following HTML 4.01 elements are removed from HTML5: <acronym> <applet> <basefont> <big> <center> <dir> <font> <frame> <frameset> <noframes> <strike> <tt>
Of course a big question is can and should you use these tags now. What kind of support exists in browsers for these new semantic tags? Not all browsers are supporting these tags, however you...
One of the things I’ve found confusing about these new structural tags is the difference between a section and an article and when to use each. The answer seems to be a matter of...
The article element represents a section of content that forms an independent part of a document or site. It represents a section of self-contained content. Can the content be syndicated as an rss feed?...
The nav element represents a section of a document that links to other documents or to parts within the document itself. It’s a section of navigational links. It’s intended for major navigational information like a sitewide navigation...
The aside element represents content that is tangentially related to the main text of a document. It aligns with what we think of as a sidebar. As with the other structural tags its not...
Similar to the header, the footer element represents the footer for a section or document. Like the header tag there can be multiple footer tags in an html5 document. A footer is more than...
The header element represents the header of a section. It’s meant to be used as a container for a group of introductory content or set of navigational links. While most websites currently have one...
The section element represents a section of a document, typically one that includes a heading. It’s used to enclose a thematic grouping of content. It’s similar to a div though it carries more semantic meaning since...
The progress tag is used to markup values in the process of changing Your download is <progress>55%</progress> complete It has 3 attributes value min max By itself it’s probably not that interesting, however when combined with...
The meter tag is used to markup measurements, specifically a scalar measurement within a known range. 1 2 <meter>1 of 10</meter> <meter>2 of 7</meter> It could also be used to represent a fractional value like...
Time as you would expect is used to markup temporal information. It can be used for dates, times, or combinations of the two. 1 2 3 <time datetime=”14:00″>2pm</time> <time datetime=”2011-07-14″>July 14th, 2011</time> <time datetime=”2011-07-14T14:00″>2pm...
HTML5 has several new layers, including a new set of semantic tags. While there is still some debate about whether or not we should be using and styling these tags I think at the very...
States of progress bar: A progress bar can be in two states – indeterminate and determinate. 1. Indeterminate Indeterminate state of the progress bar in Chrome 29 on Mac OS 10.8 Based on your combination of browser...
What is meant by urlencode and urldocode? Urlencode() returns the URL encoded version of the given string. URL coding converts special characters into % signs followed by two hex digits. For example: urlencode(“10.00%”) will...
How can we encrypt the username and password using php? You can encrypt a password with the following Mysql>SET PASSWORD=PASSWORD(“Password”); We can encode data using base64_encode($string) and can decode using base64_decode($string); What are the...
What is meant by nl2br()? Nl2br Inserts HTML line breaks before all newlines in a string string nl2br (string); For example: echo nl2br(“god bless you”) will output “god bless you” to your browser. What...
What is the difference between mysql_fetch_object and mysql_fetch_array? MySQL fetch object will collect first single matching record where mysql_fetch_array will collect all matching records from the table in an array. What is the difference...
What are the differences between GET and POST methods in form submitting, give the case where we can use get and we can use post methods? On the server side, the main difference between...
Problem You want to extract the substring preceding or following a particular match. Solution Use the preg_split() function to split the original string into an array delimited by the match term, and then extract...
Problem You want to replace all/some occurrences of a pattern or substring within a string with something else. Solution Use a regular expression in combination with PHP’s str_replace() function (for simple patters): <?php //...
Problem You want to find out how many times a particular pattern occurs in a string. Solution Use PHP’s preg_match_all() function: <?php // define string $html = “I’m <b>tired</b> and so I <b>must</b> go...