Facebook Youtube linkedin Twitter feedburner Skype Me
Showing posts with label බ්ලොග් JQuery. Show all posts
Showing posts with label බ්ලොග් JQuery. Show all posts

පාවෙන Google +1, Facebook, Twitter බොත්තම් Share Widget එකක් ඔයාලගේ බ්ලොග් එකටත් දාගන්න.. 16

bt4u | 12/10/2011 | , , , , ,


කොහොමද කට්ටියට ගොඩක් දවසකින් ඔයාලට මොකුත් බ්ලොග් ගැජට් එකක් දෙන්න බැරි උනා ඔන්න එකටත් එක්ක ලස්සන පාවෙන Google +1, Facebook, Twitter බොත්තම් Share Widget එකක් මම අරගෙන අවා.. ඔයාලත් ආසනම් මේ ගැජට් එක බ්ලොග් එකට දා ගන්න.. මම පහල කියලා තියෙන ව්දියට වැඩ ටික කරගෙන බ්ලොග් එකට මේ ගැජට් එක දා ගන්න..

මුලින්ම ඔයාලා Dashboard >> Design >> Edit Html >> යන්න..මතක ඇතුව Expand Widget Templates තැනට හරිය දෙන්න..දැන් ඔයලා යතුරු පුවරුවේ Ctrl+F යතුරු එක වර ඔබන්න..දැන් ඔයාලට ලැබේයි සේර්ච් බාර් එකක්.

එතන ]]></b:skin> කියලා ටයිප් කරන්න..දැන් ඔයලාගේ HTML box එකේ මේ කොඩ් එක Highlight වෙලා තියෙනවා පෙනෙයි..
දැන් ඔයලා ]]></b:skin> කොඩ් එකට පහලින් මම පහල දිලා තියෙන කොඩ් එක Copy, Past කරන්න...


<style type='text/css'>
#floatdiv { 
    position:absolute; 
    width:94px; 
    height:229px; 
    top:0; 
    left:0; 
        z-index:100 
}

#saamgeadaviya { 
border:1px solid #ddd;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
-goog-ms-border-radius: 6px;
border-radius: 6px; 
left: -12px;
padding: 8px; 
position:relative; 
height:220px; 
width:55px; 
margin:0 0 0 69px; 
}
</style>


දැන් Template එක Save කරන්න...Save Template 


දැන් ඔයලා Desing >> Page Element >> Add a gadget >> "Html/java script" එකක් ගන්න..එකට මම පහල දිලා තියෙන කොඩ් එක copy කරගෙන ඔයාලා "html/java script" එකට past කරන්න.

<div id="floatdiv"> 
<div id="saamgeadaviya"> 
    <table cellpadding="1px" cellspacing="0">
    <tr> 
    <td style="border-bottom: 1px solid #E8E8E8; padding:5px 0 2px 0;"> 
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="" send="false" layout="box_count" show_faces="false" font=""></fb:like> 
    </td> 
    </tr>
    <tr> 
    <td style="border-bottom: 1px solid #E8E8E8; padding:5px 0px;"> 
<g:plusone size="Tall" expr:href="data:post.url"> 
    </g:plusone></td> 
    </tr>
    <tr> 
    <td style="border-bottom: 0px solid #E8E8E8; padding:5px 0 0px 0;">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="Your Twitter ID">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> 
    </td> 
    </tr>
    <tr> 
    <td style="border-bottom: 0px solid #E8E8E8; padding:0px 0 0px 0;">
<p style=" font-size:10px; text-align:center; color:#ddd;"></p> 
    </td> 
    </tr>
    </table> 
</div> 
</div> 


<script type="text/javascript"> 
// JavaScript Document

   <!-- 
/* Script by: www.jtricks.com 
* Version: 20071017 
* Latest version: 
* www.jtricks.com/javascript/navigation/floating.html 
*/ 
var floatingMenuId = 'floatdiv'; 
var floatingMenu = 
{ 
    targetX: 0, 
    targetY: 300,
    hasInner: typeof(window.innerWidth) == 'number', 
    hasElement: typeof(document.documentElement) == 'object' 
        && typeof(document.documentElement.clientWidth) == 'number',
    menu: 
        document.getElementById 
        ? document.getElementById(floatingMenuId) 
        : document.all 
          ? document.all[floatingMenuId] 
          : document.layers[floatingMenuId] 
};
floatingMenu.move = function () 
{ 
    floatingMenu.menu.style.left = floatingMenu.nextX + 'px'; 
    floatingMenu.menu.style.top = floatingMenu.nextY + 'px'; 
}
floatingMenu.computeShifts = function () 
{ 
    var de = document.documentElement;
    floatingMenu.shiftX =  
        floatingMenu.hasInner  
        ? pageXOffset  
        : floatingMenu.hasElement  
          ? de.scrollLeft  
          : document.body.scrollLeft;  
    if (floatingMenu.targetX < 0) 
    { 
        floatingMenu.shiftX += 
            floatingMenu.hasElement 
            ? de.clientWidth 
            : document.body.clientWidth; 
    }
    floatingMenu.shiftY = 
        floatingMenu.hasInner 
        ? pageYOffset 
        : floatingMenu.hasElement 
          ? de.scrollTop 
          : document.body.scrollTop; 
    if (floatingMenu.targetY < 0) 
    { 
        if (floatingMenu.hasElement && floatingMenu.hasInner) 
        { 
            // Handle Opera 8 problems 
            floatingMenu.shiftY += 
                de.clientHeight > window.innerHeight 
                ? window.innerHeight 
                : de.clientHeight 
        } 
        else 
        { 
            floatingMenu.shiftY += 
                floatingMenu.hasElement 
                ? de.clientHeight 
                : document.body.clientHeight; 
        } 
    } 
}
floatingMenu.calculateCornerX = function() 
{ 
    if (floatingMenu.targetX != 'center') 
        return floatingMenu.shiftX + floatingMenu.targetX;
    var width = parseInt(floatingMenu.menu.offsetWidth);
    var cornerX = 
        floatingMenu.hasElement 
        ? (floatingMenu.hasInner 
           ? pageXOffset 
           : document.documentElement.scrollLeft) + 
          (document.documentElement.clientWidth - width)/2 
        : document.body.scrollLeft + 
          (document.body.clientWidth - width)/2; 
    return cornerX; 
};
floatingMenu.calculateCornerY = function() 
{ 
    if (floatingMenu.targetY != 'center') 
        return floatingMenu.shiftY + floatingMenu.targetY;
    var height = parseInt(floatingMenu.menu.offsetHeight);
    // Handle Opera 8 problems 
    var clientHeight = 
        floatingMenu.hasElement && floatingMenu.hasInner 
        && document.documentElement.clientHeight 
            > window.innerHeight 
        ? window.innerHeight 
        : document.documentElement.clientHeight
    var cornerY = 
        floatingMenu.hasElement 
        ? (floatingMenu.hasInner  
           ? pageYOffset 
           : document.documentElement.scrollTop) + 
          (clientHeight - height)/2 
        : document.body.scrollTop + 
          (document.body.clientHeight - height)/2; 
    return cornerY; 
};
floatingMenu.doFloat = function() 
{ 
    // Check if reference to menu was lost due 
    // to ajax manipuations 
    if (!floatingMenu.menu) 
    { 
        menu = document.getElementById 
            ? document.getElementById(floatingMenuId) 
            : document.all 
              ? document.all[floatingMenuId] 
              : document.layers[floatingMenuId];
        initSecondary(); 
    }
    var stepX, stepY;
    floatingMenu.computeShifts();
    var cornerX = floatingMenu.calculateCornerX();
    var stepX = (cornerX - floatingMenu.nextX) * .07; 
    if (Math.abs(stepX) < .5) 
    { 
        stepX = cornerX - floatingMenu.nextX; 
    }
    var cornerY = floatingMenu.calculateCornerY();
    var stepY = (cornerY - floatingMenu.nextY) * .07; 
    if (Math.abs(stepY) < .5) 
    { 
        stepY = cornerY - floatingMenu.nextY; 
    }
    if (Math.abs(stepX) > 0 || 
        Math.abs(stepY) > 0) 
    { 
        floatingMenu.nextX += stepX; 
        floatingMenu.nextY += stepY; 
        floatingMenu.move(); 
    }
    setTimeout('floatingMenu.doFloat()', 20); 
};
// addEvent designed by Aaron Moore 
floatingMenu.addEvent = function(element, listener, handler) 
{ 
    if(typeof element[listener] != 'function' || 
       typeof element[listener + '_num'] == 'undefined') 
    { 
        element[listener + '_num'] = 0; 
        if (typeof element[listener] == 'function') 
        { 
            element[listener + 0] = element[listener]; 
            element[listener + '_num']++; 
        } 
        element[listener] = function(e) 
        { 
            var r = true; 
            e = (e) ? e : window.event; 
            for(var i = element[listener + '_num'] -1; i >= 0; i--) 
            { 
                if(element[listener + i](e) == false) 
                    r = false; 
            } 
            return r; 
        } 
    }
    //if handler is not already stored, assign it 
    for(var i = 0; i < element[listener + '_num']; i++) 
        if(element[listener + i] == handler) 
            return; 
    element[listener + element[listener + '_num']] = handler; 
    element[listener + '_num']++; 
};
floatingMenu.init = function() 
{ 
    floatingMenu.initSecondary(); 
    floatingMenu.doFloat(); 
};
// Some browsers init scrollbars only after 
// full document load. 
floatingMenu.initSecondary = function() 
{ 
    floatingMenu.computeShifts(); 
    floatingMenu.nextX = floatingMenu.calculateCornerX(); 
    floatingMenu.nextY = floatingMenu.calculateCornerY(); 
    floatingMenu.move(); 
}
if (document.layers) 
    floatingMenu.addEvent(window, 'onload', floatingMenu.init); 
else 
{ 
    floatingMenu.init(); 
    floatingMenu.addEvent(window, 'onload', 
        floatingMenu.initSecondary); 
}
//-->
</script>

<script src='http://apis.google.com/js/plusone.js' type='text/javascript'> {lang: &#39;en-US&#39;} </script>


වැදගත්: ඉහත කොඩ් එකේ Your Twitter ID තැනට ඔයාලගේ twitter id එක දෙන්න ..

දැන් HTML/JavaScript එක Save කරගන්න..

වැඩේ ගොඩ....

wooow.. දැන් ඔයලගේ බ්ලොග් එකටත් ලස්සන පාවෙන Google +1, Facebook, Twitter බොත්තම් Share Widget එකක් තියෙනවා.. :D

ඔබට ජය

ලස්සන jQuery Tab Menu එකක් බ්ලොගයට දා ගන්න 17

සෑම් | 8/27/2010 | , ,



මෙන්න මම ඔයලට තවත් මැක්සා ගැජට් එකක් ගෙනවා..මේ ගැජට් එකෙන් වෙන්නේ ඔයලාට එකම ගැජට් එකක වැඩ ගොඩක් දාන්න පුලුවන්..ඉතින් ඔයලත් මේ ගැජට් එකට අසා නම් මම ඔයලට එක දා ගන්න උදව් කරන්නම්..මම පහල කියල තියෙන විදියට වැඩ ටික කරන්න


පලමුව ඔයාලා Layout >> Edit Html >> යන්න..මතක ඇතුව Expand Widget Templates තැනට හරිය දෙන්න..දැන් ඔයලා යතුරු පුවරුවේ Ctrl+F යතුරු එක වර ඔබන්න..දැන් ඔයාලට ලැබේයි සේර්ච් බාර් එකක්.

එතන </head> කියලා ටයිප් කරන්න..දැන් ඔයලාගේ HTML box එකේ මේ code එක Higlight වෙලා තියෙනවා පෙනෙයි..දැන් ඔයලා </head> කොඩ් එකට පහලින් මම පහල දිලා තියෙන කොඩ් එක Copy,past කරන්න..



<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js' type='text/javascript'/>

<script type='text/javascript'>
$(document).ready(function() {
//Get all the LI from the #tabMenu UL
$(&#39;#tabMenu &gt; li&#39;).click(function(){
//perform the actions when it&#39;s not selected
if (!$(this).hasClass(&#39;selected&#39;)) {
//remove the selected class from all LI
$(&#39;#tabMenu &gt; li&#39;).removeClass(&#39;selected&#39;);
//Reassign the LI
$(this).addClass(&#39;selected&#39;);
//Hide all the DIV in .boxBody
$(&#39;.boxBody div&#39;).slideUp(&#39;1500&#39;);
//Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
$(&#39;.boxBody div:eq(&#39; + $(&#39;#tabMenu &gt; li&#39;).index(this) + &#39;)&#39;).slideDown(&#39;1500&#39;);
}
}).mouseover(function() {
//Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest
$(this).addClass(&#39;mouseover&#39;);
$(this).removeClass(&#39;mouseout&#39;);
}).mouseout(function() {
//Add and remove class
$(this).addClass(&#39;mouseout&#39;);
$(this).removeClass(&#39;mouseover&#39;);
});
//Mouseover with animate Effect for Category menu list
$(&#39;.boxBody #category li&#39;).click(function(){
//Get the Anchor tag href under the LI
window.location = $(this).children().attr(&#39;href&#39;);
}).mouseover(function() {
//Change background color and animate the padding
$(this).css(&#39;backgroundColor&#39;,&#39;#888&#39;);
$(this).children().animate({paddingLeft:&quot;20px&quot;}, {queue:false, duration:300});
}).mouseout(function() {
//Change background color and animate the padding
$(this).css(&#39;backgroundColor&#39;,&#39;&#39;);
$(this).children().animate({paddingLeft:&quot;0&quot;}, {queue:false, duration:300});
});
//Mouseover effect for Posts, Comments, Famous Posts and Random Posts menu list.
$(&#39;#.boxBody li&#39;).click(function(){
window.location = $(this).children().attr(&#39;href&#39;);
}).mouseover(function() {
$(this).css(&#39;backgroundColor&#39;,&#39;#888&#39;);
}).mouseout(function() {
$(this).css(&#39;backgroundColor&#39;,&#39;&#39;);
});
});
</script>



දැන් ඔයාලා ]]></b:skin> කොඩ් එක හොය ගන්න ]]></b:skin> කොඩ් එකට උඩින් මම පහල දිලා තියේන කොඩ් එක Copy , Past කරන්න


#tabMenu {margin:0; padding:0 0 0 15px;list-style:none;}
#tabMenu li {float:left;height:32px;width:39px;cursor:pointer;cursor:hand}
/* this is the button images http://amatullah83.blogspot.com*/
li.comments {background:url(http://sites.google.com/site/amatullah83/bg/tabComment.png) no-repeat 0 -32px;}
li.posts {background:url(http://sites.google.com/site/amatullah83/bg/tabstar.png) no-repeat 0 -32px;}
li.category {background:url(http://sites.google.com/site/amatullah83/bg/tabFolder.png) no-repeat 0 -32px;}
li.famous {background:url(http://sites.google.com/site/amatullah83/bg/tabHeart.png) no-repeat 0 -32px;}
li.random {background:url(http://sites.google.com/site/amatullah83/bg/tabRandom.png) no-repeat 0 -32px;}
li.mouseover {background-position:0 0;}
li.mouseout {background-position:0 -32px;}
li.selected {background-position:0 0;}
.box {width:227px}
.boxTop {background:url(http://sites.google.com/site/amatullah83/bg/boxTop.png)no-repeat;height:11px;clear:both}
.boxBody {background-color:#282828;}
.boxBottom {background:url(http://sites.google.com/site/amatullah83/bg/boxBottom.png) no-repeat;
height:11px;}
.boxBody div {display:none;}
.boxBody div.show {display:block;}
.boxBody #category a {display:block}
/* styling for the content*/
.boxBody div ul { margin:0 10px 0 25px;padding:0;width:190px;list-style-image:url(http://sites.google.com/site/amatullah83/bg/arrow.gif)}
.boxBody div li {border-bottom:1px dotted #8e8e8e; padding:4px 0;cursor:hand;cursor:pointer;font-size:10px; color:#DDDDDD;text-decoration: none;}
.boxBody div ul li.last {border-bottom:none}
.boxBody div li a{font-size:10px; color:#DDDDDD;text-decoration: none;}
.boxBody div li span { font-size:8px;color:#9F9F9F;}
/* IE Hacks */
*html .boxTop {margin-bottom:-2px;}
*html .boxBody div ul {margin-left:10px;padding-left:15px;}


දැන් Template එක Save කරන්න....Save Template

දැන් ඔයලා Layout >> Page Element >> Add a gadget >> "Html/java script" එකක් ගන්න..එකට මම පහල දිලා තියෙන කොඩ් එකක copy කරගෙන ඔයාලා "Html/java script" එකට past කරන්න.


<div class="box">

<ul id="tabMenu">
<li class="posts selected"></li> <!-- default button-->
<li class="comments"></li>
<li class="category"></li>
<li class="famous"></li>
<li class="random"></li>
</ul>

<div class="boxTop"></div>

<div class="boxBody">
<!-- default page-->
<div id="posts" class="show">
<ul>
<li>Post 1</li>
<li>Post 2</li>
<li class="last">Post 3</li>
</ul>
</div>
<div id="comments">
<ul>
<li>Comment 1</li>
<li>Comment 2</li>
<li class="last">Comment 3</li>
</ul>
</div>
<div id="category">
<ul>
<li>Category 1</li>
<li>Category 2</li>
<li class="last">Category 3</li>
</ul>
</div>
<div id="famous">
<ul>
<li>Famous post 1</li>
<li>Famous post 2</li>
<li class="last">Famous post 3</li>
</ul>
</div>
<div id="random">
<ul>
<li>Random post 1</li>
<li>Random post 2</li>
<li class="last">Random post 3</li>
</ul>
</div>

</div>

<div class="boxBottom"></div>

</div>



ඊට පස්සේ "Html/java script" එක Save කරන්න..
දැන් වැඩේ ගොඩ..


දැන් ඔයලාගේ බ්ලොග් එකටත් ලස්සන jQuery Tab Menu එකක් තියෙනෙවා
කොහොමද වැඩේ...
මතක ඇතුව ඔයාලගේ ප්‍රතිචාරයක් මේ ලිපියට දෙන්න..

ඔබට ජය

ලස්සන Image SlideShow ගැජට් එකක් බ්ලොගයට දා ගන්න 3

සෑම් | 7/29/2010 | , , ,



කොහොමද කට්ටියට :D මෙන්න මම ඔයාලට අද අරගෙන ආවේ පට්ට ගැජට් එකක්..මේ ගැජට් එකට ඔයලා ලියපු කැමතිම ලිපි එකතු කරන්න පුලුවන්..ඒ වගෙම මෙක බ්ලොගයට දා ගත්තම අමුතුම ගතියක් එයි..ඇත්තටම මේ ගැජට් එකනම් පට්ට.ඉතින් ඔයලා මේ ගැජට් එකට කැමති නම්..ඔයලට මෙක බ්ලොගයට දා ගන්න මම උදව් කරන්නම්..ඔයලා මම පහල කියල තියෙන විදියට වැඩ ටික කරන්න..

Demo එක මෙතින් බලා ගන්න

පලමුව ඔයාලා Layout >> Edit Html >> යන්න..මතක ඇතුව Expand Widget Templates තැනට හරිය දෙන්න..දැන් ඔයලා යතුරු පුවරුවේ Ctrl+F යතුරු එක වර ඔබන්න..දැන් ඔයාලට ලැබේයි සේර්ච් බාර් එකක්.

එතන </head> කියලා ටයිප් කරන්න..දැන් ඔයලාගේ HTML box එකේ මේ code එක Higlight වෙලා තියෙනවා පෙනෙයි..දැන් ඔයලා </head> කොඩ් එකට පහලින් මම පහල දිලා තියෙන කොඩ් එක Copy,past කරන්න..




දැන් Template එක Save කරන්න.... Save Template

දැන් ඔයලා Layout >> Page Element >> Add a gadget >> "Html/java script" එකක් ගන්න..එකට මම පහල දිලා තියෙන කොඩ් එකක copy කරගෙන ඔයාලා "Html/java script" එකට past කරන්න.


<div id="slider">
<ul id="sliderContent">
<li class="sliderImage">
<a href=""><img src="images/410/1.jpg" alt="1" /></a>
<span class="top"><strong>Title text 1</strong><br />Content text...</span>
</li>
<li class="sliderImage">
<a href=""><img src="images/410/2.jpg" alt="2" /></a>
<span class="top"><strong>Title text 2</strong><br />Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...Content text...</span>
</li>
<li class="sliderImage">
<img src="images/410/3.jpg" alt="3" />
<span class="bottom"><strong>Title text 3</strong><br />Content text...</span>
</li>
<li class="sliderImage">
<img src="images/410/4.jpg" alt="4" />
<span class="bottom"><strong>Title text 4</strong><br />Content text...</span>
</li>
<li class="sliderImage">
<img src="images/410/5.jpg" alt="5" />
<span class="top"><strong>Title text 5</strong><br />Content text...</span>
</li>
<div class="clear sliderImage"></div>
</ul>
</div>


ඊට පස්සේ "Html/java script" එක Save කරන්න..
දැන් වැඩේ ගොඩ..

වැදගත්
ඉහත කොඩ් එකේ රතු පාටින් ඇති තැන් වලට ඔයලා දාන්න බලාපොරොත්තු වන රූපයේ ලින්ක් එක දෙන්න
ඉහත කොඩ් එකේ කොළ පාටින් ඇති තැන් වලට ඔයලා දාන්න බලාපොරොත්තු වන ලිපියේ නම දෙන්න
ඉහත කොඩ් එකේ නිල් පාටින් ඇති තැන් වලට ඔයලා දාන්න බලාපොරොත්තු වන විස්තර ටිකක් දෙන්න

කොහොමද වැඩේ...
මතක ඇතුව ඔයාලගේ ප්‍රතිචාරයක් මේ ලිපියට දෙන්න..
ඔබට ජය

බ්ලොගයේ ලිපි වලට තරු සම්මාන දෙමු... Part 2 10

සෑම් | 7/13/2010 | , ,




කොහොමද කට්ටියට..:) මෙන්න මම ඔයාලට අද ත්වත් අලුත් ගැජට් එකක් අරගෙන අවා..මේ ගැජට් එකෙන් වෙන්නේ අපේ ලිපි වලට තරු සම්මාන දෙන්න පුලුවන්...අපේ අඩවියට යලුවො ඇවිත් ලිපිය බලලා ලිපියේ හොද,නරක තරු සම්මාන වලින් දෙන්න පුලුවන්..ඉතින් ඔයාලත් අසනම් මෙක බ්ලොගයට දා ගන්න මම පහ්ල කියල තියෙන විදියට වැඩ ටික කරන්න..ඒ වගෙම මම මේ වගම තවත් ලිපියක් ලිව්වා එක බලන්න මෙතනින් යන්න


පියවර 1. Dashboard >> Desing >>Edit HTML යන්න..මතක ඇතුව Expand Widget Templates තැනට හරියක්
දෙන්න..දැන් මම පහල දිලා තියෙන කොඩ් එක හොයා ගන්න..


<data:post.body/>

ඉට පස්සේ <data:post.body/> කොඩ් එක අවසාන වෙන තැනට මම පහල දිලා තියෙන කොඩ් එක Copy ,past කරන්න


<div class="js-kit-rating" title="" permalink=""></div>
<script src="http://js-kit.com/ratings.js"></script>


දැන් Template එක Save කරන්න.... Save Template

කොහොම්ද වැඩේ..?

මතක ඇතුව ඔයාලගේ ප්‍රතිචාරයක් මේ ලිපියට දෙන්න.