Two CSS vertical menu with show/hide effects

CSS menu and “Web 2.0″ transition effects are topics very popular on my site and in general I receive a lot of code requests about these arguments.

So I wrote this simple tutorial with two vertical menu examples with show/hide menu effect. First example uses a simple JavaScript code. Second example uses mootools to show/hide the menu with a nice vertical slide-in/slide-out effect.

Download the source code (it includes mootools framework) and take a look at the live preview to see how they woork.

Download this tutorial Live preview

1. Menu with simple show/hide effect
Step 1.1: HTML Code

This is the basic example with a simple show/hide effect which you can implement just with some lines of JavaScript code (see next step). Our menu is a <ul> list wih a button (link) which calls a simple javascript function showElement() in the next step. HTML code is the following and you can customize it how you prefer simply changing the CSS code in the source file:

<a href=“#” class=“button” onclick=“javascript:showElement(’v-menu’)”>
<span>
Click Here</span>
</a>
<ul id=“v-menu” class=“v-menu” style=“display:none;>

<li><a href=“p1.html”>Technology</a></li>
<li><a href=“p2.html”>Design</a></li>
<li><a href=“p3.html”>Css Gallery</a></li>
<li><a href=“p4.html”>Entertainment</a></li>
<li><a href=“p5.html”>Programming</a></li>

</ul>

Remember to add the property “display:none” in the ul element to hide the menu when an user load the page (it will appear only when an user clicks on the button).

1. Menu with simple show/hide effect
Step 1.2: JavaScript function

Now, in the head tag of the page, add this simple script to show/hide a generic HTML element using CSS display property:

<script type=“text/javascript”>
function showElement(layer){
var myLayer = document.getElementById(layer);
if(myLayer.style.display==”none”){
myLayer.style.display=”block”;
myLayer.backgroundPosition=”top”;
} else {
myLayer.style.display=”none”;
}
}
</script>

showElement() function take in input the ID of the HTML element you want to show/hide. When an user clicks the button and CSS display property is set to “none” (menu hidden) this script will set the property with a new value “block” (menu visible).

2. Menu with Mootools toggle effect
Step 2.1: HTML Code

This second example adds a nice vertical slide-in/slide out effect to our menu using Mootools toggle effect. HTML code is not so different from the previous example. You have:

<a href=“#” class=“button” id=“toggle”><span>Click Here</span>
</a>
<ul id=“v-menu” class=“v-menu”>

<li><a href=“p1.html”>Technology</a></li>
<li><a href=“p2.html”>Design</a></li>
<li><a href=“p3.html”>Css Gallery</a></li>
<li><a href=“p4.html”>Entertainment</a></li>
<li><a href=“p5.html”>Programming</a></li>

</ul>

… You have only to add an ID to the button which show/hide your menu. It’s not necessary to add the property “display:none” I used in the previous example in <ul> to hide the menu when an user loads the page the first time. You can do it using mootools hide() function (see the next step).

2. Menu with Mootools toggle effect
Step 2.2: JavaScript/Mootools code

Now, first of all, add a link to mootools framework in the tag of your page using this line of code:

<script type=“text/javascript” src=“mootools.svn.js”></script>

… ..and the following script immediately below the previous code:

<script type=“text/javascript”>
window.addEvent(‘domready’, function(){
var myMenu= new Fx.Slide(‘v-menu2′);
myMenu.hide();
$(‘toggle’).addEvent(‘click’, function(e){
e = new Event(e);
myMenu.toggle();
e.stop();
});
});
</script>

In this way when an user clicks on the button, your menu will appear/disapper with a nice vertical slide-in, slide-out effect. myMenu.hide(); funcion hides the menu when the page is loaded.

Customize your menu changing CSS code
You can change the look of my menu simply changing some lines of CSS code:

Download the source code and take a look at the live preview to see how they woork.

Download this tutorial Live preview

Stock to watch Tuesday - NTAP, ISRG, MT , MSFT, INTC

Chart courtesy of stockcharts

INTC gave us a small move on Monday, which could be the start of a possible bigger move. INTC can break through Monday’s high of $21.33, we should see a strong follow through move. This move would break the short-term downtrend, and should drive the stock back to $22.45. Keep watching INTC.
Chart courtesy of stockcharts

MSFT - Looks like building a base for the next up move. The stock closed above its 20 day EMA ($28.37) again. I would look for a move up to $29.21 resistance in the coming days.
Chart courtesy of stockcharts

MT is breaking out. The stock broke through the highs set in February, and should continue to move. I’m buyer of MT once it breaks through today’s high of $82.26 for the continuation move. MT will move very quickly, so watch it closely on Tuesday.
Chart courtesy of stockcharts

ISRG - Looks to have a bull flag formation on it here, after a couple of powerful days into it. Buy point would be on the day it blows through $335 on heavy volume.

Chart courtesy of stockcharts
NTAP - Sinking slowly. Major support is at $19 level, but it’s difficult to determine exactly where declines will stop.

Disclaimer : Trading stocks involves risk, this information should not be viewed as trading recommendations.The charts provided here are not meant for investment purposes and only serve as technical examples.

That’s All. Have a nice day !!!

AC

Avast, ye scurvy bastards!

As a boy, George M. Wallace always wanted to talk like a pirate; in adulthood, he became an insurance lawyer. Click on the graphic above to see his excellent presentation of Blawg Review #153. Arrgh!

One shot, one kill: how to become popular with (almost) each post you write on your blog

Do you need traffic for your website? Take a look at these simple tips…

This post is dedicated to every people who wrote me asking to me how I made popular a lot of my posts on delicious in the past weeks. There is a “simple” way to make popular your post and assure a costant high traffic on your site for a medium period conquering a place on delicious home page… and this is what you have to do.


Step 1: Write something interesting
…otherwise it’s all useless.

Step 2: your link on delicious/popular page
If you want to conquer delicious home page with your new post, the first step is do appear your new post/link on del.icio.us/popular page:

How can you do it? It’s not so difficult if you have a medium daily traffic and a god number of feeds subscribers. I noticed in average 10-12 votes on delicious (users who save your link to their bookmars) in 30 minutes are enough to do appear your link on delicious/popular page and - this is the good news - immediatly you’ll receive a high number of new visits from this page.

The “bad” news is: if you want to remain for a long time on delicious/popular page page (and in this way have a possibility to conquer delicious home page) you have to mantain an increasing votes trend for your link. And how can you do it? The faster way is using social network to promote your new post.

Step 3: Publish it and promote it on social networks
In general I use this simple… let me say… “rule” which works very well: when I publish a post on Woork the first thing I do is add it to some general news sites (I use only digg, mixx, reddit) and other niche websites related to the topics about which I write on my blog (Dzone, Design Float and CSS Globe).

Combined effect in terms of visits from these websites produces in general the hoped result and the number of people who save your link on delicious will increase quickly. In this way after one / two hours your link on delicious will catch up 100 votes, enough to appears on delicious home page!

Blog Design Madness Round 2!

With big pleasure I won the first round of Blog Design Madness on vandelaydesign.com. I received a lots of votes (woork has been the most voted site in this contest!) and I want to say thanks to everyone who voted me.

Today started the second round and you can vote for woork at this link:
http://vandelaydesign.com/blog/competition/round-two/

Thanks!

Weekend Herb Blogging #126

Ramona from The Houndstooth Gourmet is hosting this edition of Weekend Herb Blogging and I think it’s about time I revisit one of the more surprising herbs

banana

Yes, that is a banana and as I found out in an earlier WHB, bananas are indeed herbs - well the plants on which bananas grow are herbs and the banana is its fruit.

Nutritionally, bananas seem to contain a bit of everything - Vitamins A, B, B6, B12, C, E,K, Betaine, Choline, Folate, Niacin, Pantothenic Acid, Riboflavin and Thiamin as well as Calcium, Copper, Fluroride, Iron, Magnesium, Manganese, Phosphorus, Potassium, Selenium, Sodium and Zinc.

The recipe I’m making today is based on one from AWW’s “Cook” - I’ve made some minor changes to the ingredients to mirror my own preferences, hazelnuts replace walnuts and I’ve decreased the sugar but increased the nut and chocolate quantities. I’ve also given it a crunchy top in the form of a good sprinkling of pearl sugar.

Banana, Hazelnut and Chocolate Chip Bread

Banana, Hazelnut and Chocolate Chip Bread

200 grams mashed bananas
140 grams caster sugar
2 eggs, lightly beaten
¼ cup melted butter
¼ cup milk
200 grams self-raising flour, sifted
120 grams chopped roasted hazelnuts (or filberts)
80 grams dark chocolate chips
pearl sugar, for topping

Place the mashed bananas and the sugar into a bowl and stir well to combine.

Add the chocolate chips and hazelnuts and stir them through.

Whisk the eggs with the melted butter and milk and then pour this into the banana mixture - stir again and then add the sifted flour.

Fold through until just combined.

Pour into a buttered and floured 9cmx27cm or 8 cup capacity loaf pan - sprinkle with pearl sugar and then bake in a preheated 160°C/320°F for about an hour or until cooked through and golden.

Cool slightly in the tin before turning out onto a wire rack.

banana, hazelnut and choc chip bread

If you eat it warm, the chocolate will still be gooey.

banana, hazelnut and choc chip bread

You can, if you show great restraint, cut thick slices and toast it the next day. It can also be used to make French toast.

Tagged

Trade Ideas for Next week - JASO, ESV, WMT,JDSU, BIDU, RFMD, CREE

Chart courtesy of stockcharts

CREE - Long term uptrend. Still under correction. Stock has been pulling back on light volume and may find support at this trendline and the lower band. The technical chart looks positive as 50 day moving average has crossed on top of 200 day moving average around February to form Golden Cross.
Chart courtesy of stockcharts

RFMD - It seems to me that RFMD has been in a bear market since the start of the year and now it maybe ready to bounce off the current levels, but confirmation is required still. Its down from around $6 a share to around $2.50. In my honest opinion stock is looking very attractive at this point and volume also are telling us something, average daily volume has decreased nearly 50%. In addition, although the stock didn’t perform well since January, we should see a rebound as the technical chart now shows positive momentum is back as MACD is now back above 0.
Chart courtesy of stockcharts

BIDU - The stock may face strong resistance at $254 ( 50-day moving average ), above it may test $271.90 ( 200-day moving average ) and thereafter it may test $280. All the trends in stock indicators are neutral or positive.
Chart courtesy of stockcharts

JDSU - The stock was confined to a narrow trading band between $13 and $14 and the price action last week was characterised by a good upward pattern. The share price is now perched just above the crucial support level at $13. A close below this level would spell weakness. This could result in a drop to the $12.50-$12.25 range subsequently. Hold with a stop-loss at $12.96. A close above $13.64 ( 200 dma ) would negate the bearish outlook and provide an upward momentum to JDS Uniphase.
Chart courtesy of stockcharts

WMT - After touching a high of $54.15, the stock turned weak on Tuesday. The outlook for the stock remains bullish. The stock appears on course to move to the target zone of the $51.30-51.24 range that was the previous resistance now has become the most important support.
Chart courtesy of stockcharts

ESV - The short-term trend has turned weak, as the stock closed below the stop-loss level of $60 The stock is likely to slide to the $57-58 range next week.
Chart courtesy of stockcharts
JASO - After a long up leg that brought prices from the March low of $12.17 to Friday highs of $19.15, the stock has gained nearly 60 percent. Can we open long positions now? Aggressive traders may open long positions and I really like the chart but at this level I would wait for a pull back before putting any cash to work.

Disclaimer : Trading stocks involves risk, this information should not be viewed as trading recommendations.The charts provided here are not meant for investment purposes and only serve as technical examples.

That’s All. Have a nice weekend !!!

AC

Classic Teak

Looking for an amazing selection of quality teak furniture for your home or garden ? Then Classic Teak is the place that should visit. They are a Bay area company that specializes in fine quality teak patio furniture & garden furniture at substantial discounts from the high end retail store locations. They use only the finest quality teakwood and each teak accessory is individually handcraft and inspected by their professionals. Their furniture collection is vast and prices substantial below than you can imagine for this high quality of products. For those that want to set off the design of their indoor and outdoor living spaces at affordable prices, Classic Teak is a good place to visit.

Statistics of AC Investor Blog over week 13 ( from 22/3 to 28/3 )

Here is the chart provided by SiteMeter describing the overall Statistics of AC Investor Blog over the week 13 . If you’re Interested in advertise on AC Investor Blog, send an email to antonio.mrcosta@gmail.com with your offer or use the forms within the site.

Some statistics of blog during the week 13
Posts: 10
Total Visitors : 2554
Total Page Loads : 4128
Most traffic from: USA, Portugal, UK, Germany, Austria

Enjoy your weekend !!!!

AC

Stonebridge Village

I was browsing for some sites this morning and found StoneBridgeVillage site. Do you know what this site is all about? It is the perfect place for a second home, retirement investment or full time residence. Since 1993, StoneBridge Village has helped thousands find the good life through sales of custom-built luxury estates, patio and single-family homes, lodges and more. They offer assistance and a good customer service for those who are looking for some property to invest. For example, if you’re planning a vacation or even live in Branson Missouri, Stonebridge Village is a great place to begin looking for a Branson property. Want to find more ? visit them at StoneBridge Village site at www.stonebridgebranson.com !