Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:596:{s:13:\"theme_default\";s:7:\"menimal\";s:13:\"filter_html_1\";i:1;s:18:\"node_options_forum\";a:1:{i:0;s:6:\"status\";}s:18:\"drupal_private_key\";s:64:\"39f50230735ca89e353af0cb71734b69f5e98aefebf517848945916813104b50\";s:10:\"menu_masks\";a:26:{i:0;i:127;i:1;i:125;i:2;i:63;i:3;i:62;i:4;i:61;i:5;i:59;i:6;i:58;i:7;i:57;i:8;i:56;i:9;i:31;i:10;i:30;i:11;i:29;i:12;i:28;i:13;i:24;i:14;i:21;i:15;i:15;i:16;i:14;i:17;i:13;i:18;i:12;i:19;i:11;i:20;i:7;i:21;i:6;i:22;i:5;i:23;i:3;i:24;i:2;i:25;i:1;}s:12:\"install_task\";s:4:\"done\";s:13:\"menu_expanded\";a:0:{}s:21:\"date_default_timezone\";i:-14400;s:23:\"user_email_verification\";i:1;s:9:\"clean_url\";s:1:\"1\";s:12:\"install_time\";i:1255720707;s:17:\"node_options_ in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Illegal string offset 'host' in /home/topazzz/public_html/sites/all/modules/mobile_tools/mobile_tools.module on line 755

Warning: Illegal string offset 'host' in /home/topazzz/public_html/sites/all/modules/mobile_tools/mobile_tools.module on line 755

Warning: Illegal string offset 'host' in /home/topazzz/public_html/sites/all/modules/mobile_tools/mobile_tools.module on line 755

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: DELETE FROM cache WHERE cid = 'variables' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'theme_registry:menimal' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:3:{s:6:\"ctools\";a:0:{}s:13:\"views_content\";a:0:{}s:6:\"panels\";a:4:{s:14:\"pane_plain_box\";O:8:\"stdClass\":3:{s:8:\"filename\";s:83:\"sites/all/modules/panels/plugins/style_bases/pane/pane_plain_box/pane_plain_box.inc\";s:8:\"basename\";s:18:\"pane_plain_box.inc\";s:4:\"name\";s:14:\"pane_plain_box\";}s:19:\"pane_rounded_shadow\";O:8:\"stdClass\":3:{s:8:\"filename\";s:93:\"sites/all/modules/panels/plugins/style_bases/pane/pane_rounded_shadow/pane_rounded_shadow.inc\";s:8:\"basename\";s:23:\"pane_rounded_shadow.inc\";s:4:\"name\";s:19:\"pane_rounded_shadow\";}s:21:\"region_rounded_shadow\";O:8:\"stdClass\":3:{s:8:\"filename\";s:99:\"sites/all/module in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:5:{s:7:\"content\";a:1:{s:13:\"content_field\";O:8:\"stdClass\":3:{s:8:\"filename\";s:69:\"sites/all/modules/cck/includes/panels/content_types/content_field.inc\";s:8:\"basename\";s:17:\"content_field.inc\";s:4:\"name\";s:13:\"content_field\";}}s:6:\"ctools\";a:53:{s:14:\"node_form_menu\";O:8:\"stdClass\":3:{s:8:\"filename\";s:75:\"sites/all/modules/ctools/plugins/content_types/node_form/node_form_menu.inc\";s:8:\"basename\";s:18:\"node_form_menu.inc\";s:4:\"name\";s:14:\"node_form_menu\";}s:20:\"node_form_publishing\";O:8:\"stdClass\":3:{s:8:\"filename\";s:81:\"sites/all/modules/ctools/plugins/content_types/node_form/node_form_publishing.inc\";s:8:\"base in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'imagecache:presets' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:4:{i:2;a:4:{s:8:\"presetid\";s:1:\"2\";s:10:\"presetname\";s:12:\"gallery_full\";s:7:\"actions\";a:2:{i:0;a:6:{s:8:\"actionid\";s:1:\"4\";s:8:\"presetid\";s:1:\"2\";s:6:\"weight\";s:1:\"0\";s:6:\"module\";s:10:\"imagecache\";s:6:\"action\";s:16:\"imagecache_scale\";s:4:\"data\";a:3:{s:5:\"width\";s:3:\"520\";s:6:\"height\";s:0:\"\";s:7:\"upscale\";i:0;}}i:1;a:6:{s:8:\"actionid\";s:1:\"7\";s:8:\"presetid\";s:1:\"2\";s:6:\"weight\";s:1:\"0\";s:6:\"module\";s:10:\"imagecache\";s:6:\"action\";s:15:\"imagecache_crop\";s:4:\"data\";a:4:{s:5:\"width\";s:4:\&q in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:1:{s:6:\"panels\";a:9:{s:14:\"twocol_stacked\";O:8:\"stdClass\":3:{s:8:\"filename\";s:74:\"sites/all/modules/panels/plugins/layouts/twocol_stacked/twocol_stacked.inc\";s:8:\"basename\";s:18:\"twocol_stacked.inc\";s:4:\"name\";s:14:\"twocol_stacked\";}s:17:\"threecol_25_50_25\";O:8:\"stdClass\":3:{s:8:\"filename\";s:80:\"sites/all/modules/panels/plugins/layouts/threecol_25_50_25/threecol_25_50_25.inc\";s:8:\"basename\";s:21:\"threecol_25_50_25.inc\";s:4:\"name\";s:17:\"threecol_25_50_25\";}s:8:\"flexible\";O:8:\"stdClass\":3:{s:8:\"filename\";s:62:\"sites/all/modules/panels/plugins/layouts/flexible/flexible.inc\";s:8:\"basename\";s:12:\"flexible.inc\" in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'schema' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:112:{s:19:\"aggregator_category\";a:6:{s:11:\"description\";s:54:\"Stores categories for aggregator feeds and feed items.\";s:6:\"fields\";a:4:{s:3:\"cid\";a:3:{s:4:\"type\";s:6:\"serial\";s:8:\"not null\";b:1;s:11:\"description\";s:43:\"Primary Key: Unique aggregator category ID.\";}s:5:\"title\";a:5:{s:4:\"type\";s:7:\"varchar\";s:6:\"length\";i:255;s:8:\"not null\";b:1;s:7:\"default\";s:0:\"\";s:11:\"description\";s:22:\"Title of the category.\";}s:11:\"description\";a:4:{s:4:\"type\";s:4:\"text\";s:8:\"not null\";b:1;s:4:\"size\";s:3:\"big\";s:11:\"description\";s:27:\"Description of the category\";}s:5:\&q in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:1:{s:6:\"panels\";a:6:{s:15:\"rounded_corners\";O:8:\"stdClass\":3:{s:8:\"filename\";s:67:\"sites/all/modules/panels/plugins/styles/corners/rounded_corners.inc\";s:8:\"basename\";s:19:\"rounded_corners.inc\";s:4:\"name\";s:15:\"rounded_corners\";}s:4:\"list\";O:8:\"stdClass\":3:{s:8:\"filename\";s:48:\"sites/all/modules/panels/plugins/styles/list.inc\";s:8:\"basename\";s:8:\"list.inc\";s:4:\"name\";s:4:\"list\";}s:7:\"default\";O:8:\"stdClass\":3:{s:8:\"filename\";s:51:\"sites/all/modules/panels/plugins/styles/default.inc\";s:8:\"basename\";s:11:\"default.inc\";s:4:\"name\";s:7:\"default\";}s:5:\"naked\";O:8:\"stdCl in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: DELETE FROM cache WHERE cid = 'variables' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: DELETE FROM cache WHERE cid = 'variables' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: DELETE FROM cache WHERE cid = 'variables' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: DELETE FROM cache WHERE cid = 'variables' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: DELETE FROM cache WHERE cid = 'variables' in /home/topazzz/public_html/includes/database.mysql.inc on line 135

Warning: Table './topazzz_drpl1/cache' is marked as crashed and last (automatic?) repair failed query: UPDATE cache SET data = 'a:413:{s:18:\"aggregator_wrapper\";a:8:{s:9:\"arguments\";a:1:{s:7:\"content\";N;}s:4:\"file\";s:20:\"aggregator.pages.inc\";s:8:\"template\";s:37:\"modules/aggregator/aggregator-wrapper\";s:4:\"type\";s:6:\"module\";s:10:\"theme path\";s:18:\"modules/aggregator\";s:13:\"include files\";a:1:{i:0;s:41:\"./modules/aggregator/aggregator.pages.inc\";}s:11:\"theme paths\";a:1:{i:0;s:18:\"modules/aggregator\";}s:20:\"preprocess functions\";a:4:{i:0;s:19:\"template_preprocess\";i:1;s:38:\"template_preprocess_aggregator_wrapper\";i:2;s:14:\"zen_preprocess\";i:3;s:11:\"zen_process\";}}s:27:\"aggregator_categorize_items\";a:8:{s:9:\"arguments\";a:1:{s:4:\"form\" in /home/topazzz/public_html/includes/database.mysql.inc on line 135
Javascrip Made Easy - Tips & Tricks for Successful Coding | Menimal
Jump to Navigation

Javascript Made Easy

Printer-friendly versionSend to friendPDF version
Share
September 11, 2010

Most, if not all developers who read this have at least heard of jQuery, one of the most powerful Javascript libraries out there. Most notably, there are a seemingly infinite number of "plugins" or "packages" that can be downloaded and implemented with almost zero knowledge of coding.

As tempting as it may be to simply use a package deal, a little bit of jQuery knowledge can go a long way. Note that as a Javascript library jQuery isn't really a different language, it's an extension of Javascript that allows you to do essentially the same tasks with significantly less code.

Let's start with a simple example for the first entry on this subject.

<script type="text/javascript">
$(document).ready(function() {
     $("#element").click(function() {
          $(this).css('color', 'red');
     });
});
</script>
<div id="element">Click me</div>

The above code tells javascript to find the element that has an ID value of "element". When it senses that the user has clicked on it, it performs a simple CSS change and makes the text red.

Click me

Comments

jQuery

Wow that really is easy. I can do some neat stuff without a lot of work.

Post new comment

The content of this field is kept private and will not be shown publicly.