Dynamic Guru - The Web and Technology Blog


ajax css design featured freebies google html internet javascript jquery php seo technology tools web wordpress wordpress themes xhtml
 

jQuery : How to highlight alternate rows of a table

While displaying large chunks of data in a table with lots of rows, it is really desireable to have a different background color for alternating rows. While there is no easy way you can do that using css alone, it is highly impractical to manually add a alt class to each alternate tr (table row). But thanks to the powerful selector engine of jQuery, you can very easily select an alternate tr . Here is how :

$("#mytable tr:odd").addClass("alt");

The above code selects every odd table row of the table with id mytable and adds a class alt to each of theme. Next you can style the alt class rows (tr) using css to make them stand out and add a nice zebra strip effect to your table.

Wordpress theme : Tranquility 1.0

Free light professional wordpress theme

Tranquility is light weight light color wordpress theme with a brilliant professional silver look. The theme has a widgetized sidebar , rounded corners and many exciting features.
Continue Reading…

Lorem ipsum… what is it?

According to wikipedia

In publishing and graphic design, lorem ipsum is the name given to commonly used placeholder text (filler text) to demonstrate the graphic elements of a document or visual presentation, such as font, typography, and layout. The lorem ipsum text, which is typically a non-sensical list of semi-Latin words, is a hacked version of a Latin text by Cicero, with words/letters omitted and others inserted, but not proper Latin

Continue Reading…

5 very useful online web tools

Online web tools

Web Tools is a collection of online tools developed to make your task easier. Currently it features 5 tools including :

  1. md5 hash calculator
  2. sha1 hash calculator
  3. HTML to ASCII convertor
  4. HTML and php tags stripper
  5. & Base 64 encoder and decoder

The tools are developed using some pretty basic php functions , but still are of great use. The functions used are :

sha1(); //for sha1 hash calculator
md5(); //for md5 hash calculator
strip_tags(); //strips all php and html tags
htmlspecialchars(); //converts all html characters to their corresponding ASCII characters
base64_encode(); //encodes a string in base64 format
base64_decode(); //decodes a string from base64 format

Scenic Sanity – A clean jquerified wordpress theme

Free Wordpress theme - Scenic sanity
Scenic Sanity is yet another free gorgeous wordpress theme from dynamicguru.com licensed under GPL. It is a light color variant of my previous theme “The Last fall” .It has two-columns , a widgetized left-sidebar and gravtar integrated comments , ideal for personal weblogs . Some of the cool features include :

  • Cufon text-image replacement for headers
  • jquery hover effects on links in the sidebar
  • Rounded corners in FireFox and Safari
  • Excerpt based homepage
  • Collapsible left sidebar widgets
  • Sleek styles for the Calendar widget

Download Scenic Sanity 1.1

Check out this wordpress theme, perfect for photographers and bloggers.

Wordpress – How to display featured posts in your theme

“Featured Posts” are a key feature of any news/journal wordpress site. It is pretty easy to develop a wordpress theme to display a fixed number of featured posts from a specific category on the homepage. It can be done using the query_posts() function of wordpress. Here are few lines of code that displays latest 10 posts from the news category , you can edit it to tailor to your needs.

<?php
/* Name of your category you want to show posts from */
$cat = "news";

/* No. of posts to display*/
$num = "10";
 
?>

        <!– Show x Posts from $cat category–>
        <?php query_posts(’showposts=’.$num.‘&category_name=’.$cat.);
          while (have_posts()) : the_post();
        ?>
        <h2><?php the_title(); ?></h2>
        <div class="entry">
        <?php the_content(‘Continue…’); ?>
        <p class="postmetadata">Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’, , ‘ | ‘); ?>  <?php comments_popup_link(‘No Comments &#187;’, ‘1 Comment &#187;’, ‘% Comments &#187;’); ?></p>
       
        <a href="<?php the_permalink(); ?>" class="permalink">Link to this article</a>
        </div>
<?php endwhile; ?>

The function query_posts(); can be used to control which posts are displayed in the loop. More information on using query_posts(); can be found here : http://codex.wordpress.org/Template_Tags/query_posts .

Cufon – easy and fast text-image replacement solution

Cufon - easy and fast text-image replacement solutionHave you ever wanted to use your own font on your website? but bothered about it being installed on your visitors system? Cufon is the solution for you, it makes possible fast and easy replacement of text with the font of your wish. It is extremely easy to set up and supports nearly all major browsers. And also it is SEO friendly.
Here is a demo of Cufon on my portfolio site, those headings with silver gradients are actually text replaced by Cufon on the fly.

Using Cufon

To use Cufon on your site , first download this js file (http://cufon.shoqolate.com/js/cufon-yui.js) and then generate your own font’s js file by uploading your font file here : http://cufon.shoqolate.com/generate/ . Once you have both the javascript files , include it in the head section of your web page like this :

<script src="path/to/cufon-yui.js" type="text/javascript" ></script>
<script src="path/to/generated-font-file.js" type="text/javascript" ></script>

Now we are all set up to replace your text , to replace the text with cufon , add the following piece of javascript to your page :

<script type="text/javascript">
Cufon.replace(‘h1′);
</script>

The above lines of code will replace all your h1 elements with images rendered in your font.
You can take a look at a more detailed guide to replacing text with cufon here : http://wiki.github.com/sorccu/cufon/usage

Styling your rendered text

You can also add linear gradients to your text with cufon!, here is how :

Cufon.replace(‘h1′, {
        color: ‘-linear-gradient(#000, #777, #777, #000)’
});

The above code will cause the text to fade from black (#000) to grey (#777) and then back.For a comprehensive guide to styling using cufon refer to : http://wiki.github.com/sorccu/cufon/styling
So why wait? go ahead and try it out today, i bet its awesome and the easiest text-image replacement solution available right now, much simpler and better that sIFR.

My new webdesign portfolio (v2)

My New online webdesign portfolio
Check out my new web design portfolio at : www.dynamicguru.com/mujtaba/ . This time i ‘ve chosen light colors, mainly #eee for background and #09f for various visual elements . It is a single page site and is again powered by jQuery . I’ve tried to keep things as simple and to the point as possible, no more lengthy “about me” or boring portfolio page. The site was designed and developed in just 2 days.
Here is a look at whats behind it :

  • A jQuery UI powered “content slider” for showcasing my works
  • Table-less css based grid layout
  • Ajaxified contact form
  • css3 rounded corners (for browsers that support it)
  • Valid XHTML 1.0 Strict
© 2012 Dynamic Guru All rights reserved - About Us - WordPress themes - Mujtaba Ahmad