Tag: Javascript


JavaScript for Web Design

JavaScript for Web Design – Advantages and Disadvantages

This article discusses the good and the bad points of using JavaScript in your website designs. It points out the areas where JavaScript excels as a web based programming language and also describes situations where its use can actually detract from the performance of a website. Browser based programming language First of all, JavaScript is a browser based programming language that actually runs client side. This means that any code that you write in JavaScript is delivered along with your web pages and the scripts that you write actually run from within the users’ browser rather than directly on the server that is serving the web page. There are situations where JavaScript is an excellent solution for implementing neat features in a web design but there are also situations where using JavaScript can hurt your websites performance. It is my aim in this article to describe the best ways to use JavaScript and how to circumnavigate the downsides of using this versatile and powerful scripting language. JavaScript for Web Design – The Advantages JavaScript is an excellent solution to implement when validating input forms on the client side. This means that if a user forgets to enter his name in a form for instance a JavaScript validation function can popup a message to let him know about the omission. This is a far better solution that having a server side validation routine handle the error because the server does not have to do any additional processing. An asp or php routine could be written to achieve the same task but the JavaScript would not allow the form to be submitted unless it was completed properly in the first place, a much more robust solution! Another area where JavaScript excels is in the creation of dynamic effects such as rollover images…

Continue Reading



Resolve JQuery Conflict in WordPress

WordPress WordPress began as a blogging framework, however it is used as full content management system. WordPress is developed on  HTML5, PHP,MySQL,Jquery , CSS . WordPress repository now contains wide variety of plugins  and themes. WordPress Themes are ready-made layouts created for WordPress. Theses themes allow users to change the look and functionality of a WordPress website and they can be installed without altering the content of the site.WordPress themes are mainly classified into  free themes and premium themes. Free themes are listed in the WordPress theme directory and premium themes can be purchased from marketplaces and individual WordPress developers.  Some fastest loading themes includes Wordpress twenty sixteen, Themeforest Avada and Enfold. WordPress Plugins extending  the functionality of your wordpress site. Some of commonly used plugins include Contact Form 7, TinyMCE Advanced, NextGEN Gallery and Advanced Custom Fields. JQuery in WordPress Including JQuery in WordPress theme Add the following to the theme’s functions.php file: if (!is_admin()) add_action(“wp_enqueue_scripts”, “my_jquery_enqueue”, 11); function my_jquery_enqueue() { wp_deregister_script(‘jquery’); wp_register_script(‘jquery’, “http” . ($_SERVER[‘SERVER_PORT’] == 443 ? “s” : “”) . “://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js”, false, null); wp_enqueue_script(‘jquery’); } JQuery Issues in WordPress Jquery is a widely used powerful javascript framework. When you are using the jquery in wordpress that time you need to keep in mind some issues. WordPress itself uses the jquery in their framework. But when we try to add  different versions of jquery and their plugins, this leads to some issues or conflict with wordpress core. How to resolve JQuery Conflict in WordPress WordPress itself uses the jquery in their framework. So you dont need to add the jquery script again in to wordpress. For removing the conflicts when you are using the jquery functions, just use the following no conflict code. <script type=”text/javascript”>// <![CDATA[ $.noConflict(); jQuery(document).ready(function($) { // Code that uses jQuery’s $ can follow here. }); // Code that uses other library’s $ can follow here. // ]]></script> if you are familiar…

Continue Reading