Find all the elements with an id

Find all the elements with an id The answer to the question is $(“[id$=’txtTitle’]”), as Mark Hurd answered, but for those who, like me, want to find all the elements with an id which starts with a given string (for example txtTitle), try this (doc) : $(“[id^=’txtTitle’]”) If you want to select elements which id […]

Read More

jQuery Tips You Should Know

Back to Top Button By using the animate and scrollTop methods in jQuery you don’t need a plugin to create a simple scroll-to-top animation: // Back to top $(‘a.top’).click(function (e) { e.preventDefault(); $(document.body).animate({scrollTop: 0}, 800); }); <!– Create an anchor tag –> <a class=”top” href=”#”>Back to top</a> Changing the scrollTop value changes where you wants […]

Read More

Unwanted Form Styles

Tablets and mobile devices often come with default styles that can mess up your forms. To get rid of default styling on your form elements, put the following code in your CSS:   input[type=text], button, select, textarea{ -webkit-appearance: none; -moz-appearance: none; border-radius: 0px; Feel free to mix and match depending on what types of form […]

Read More

Unexpected Font Size Changes

Rotating an iOS device sideways can change the text size of your pages and ruin your layouts. This issue frequently happens with fixed position elements like navigation bars and menus. Once this happens, the only way to fix it is to refresh the page. Fortunately, there’s a way to stop unwanted text size changes before […]

Read More

Web Technology Surveys

W3Techs provides information about the usage of various types of technologies on the web. Their vision – Provide the most reliable and most extensive source of information on web technology usage. In our web technology surveys you can see the most popular technologies in these categories.   Source: W3Techs – World Wide Web Technology Surveys

Read More

15 big-time tools for freelancers

1. Blur Group There’s no such thing as too many prospective clients: even if you have a job and many projects to work on, you never know when the door will close. That’s why it’s a good practice to be open for new clients and prospects. Blur Group is one of the best job boards […]

Read More

WordPress Loop With Style

Using built-in WordPress functionality, you can display any information you want, wherever you want. WordPress makes it easy to display vital post data, navigational tools, and many other versatile features 3. To see an example of this in action, replace the previous loop example with the following, fully-pimped version of WordPress looping bliss. This is like […]

Read More

Alternative Basic WordPress Loop

The next example is a carbon copy of the previous loop example, only with several key (X)HTML elements added for clarity. Copy & paste this code into the index.php 1 of your WordPress theme and examine the results in a browser. Hopefully, combining the code comments with the browser output 2 will give you a crystal clear […]

Read More

Basic WordPress Loop

// any code included here occurs before the wordpress loop and is always displayed <?php if (have_posts()) : ?> // if there are posts to display, process any code included here only once // display any code output from this region above the entire set of posts <?php while (have_posts()) : the_post(); ?> // loop […]

Read More

Simple Example of How to Use WordPress Cron

This code snippet uses wp-cron to schedule an automatic email that will be sent every hour. // send automatic scheduled email if (!wp_next_scheduled(‘my_task_hook’)) { wp_schedule_event(time(), ‘hourly’, ‘my_task_hook’); } add_action(‘my_task_hook’, ‘my_task_function’); function my_task_function() { wp_mail(‘you@yoursite.com’, ‘Automatic email’, ‘Hello, this is an automatically scheduled email from WordPress.’); } Of course, this is meant only as an example. […]

Read More