Category Covered

How to show-hide or Read more-less article using a simple javascript  

How to show/hide or Read more/less article using a simple javascript
 
 Here I have given a simple example of read more text using simple javascript code.
    <div class="text">
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an un  
By: mimosa  |   Total Read: 835  |   Read more..

Read two xml file using javascript  

I have two xml file products.xml and categories.xml file. So i am going two make a tree that will show category and its related products.   $(document).ready(function(){ $.get('xml/categories.xml',function(data){ var _html="<ul>"; $(data).find('Categories').each(function(key,value){ _html+="<li>"+$(this).find('CategoryName').text(); catId = $(this).find("CategoryID").  
By: Tech writer  |   Total Read: 1913  |   Read more..

Javascript function not working without alert  

I have a javascript function but without alert why its not working? I am confused. I used the delay/ sleep function but still now no success.   $(document).ready(function(){ $.get('xml/categories.xml',function(data){ var _html="<ul>"; $(data).find('Categories').each(function(key,value){ _html+="<li><a href='#'>"+$(this).find('CategoryName').text()+"</a>";  
By: Tech writer  |   Total Read: 2182  |   Read more..

Javascript email validation  

To validate email using javascript or email validation using jquery you can use the code of snipet x = $('#email1').val();
            var atpos=x.indexOf("@");
            var dotpos=x.lastIndexOf(".");
            if(atpos<1 || dotpos<atpos+2 || dotpos+2>=x.leng  
By: Tech writer  |   Total Read: 1359  |   Read more..

How to close window  


Use the code <script type="text/javascript"> window.close(); </script> You can also use  $.fancybox.close(); if you use fancy box window

   
By: mimosa  |   Total Read: 999  |   Read more..

display screen resolution  

how to get the screen resolution of my pc browser? Use the following line on you jquery code. $(window).width();
$(window).height();  
By: Tech writer  |   Total Read: 1847  |   Read more..

Javascript reset form after submit  

You can reset form using javascript or ajax on several way such as  
$.ajax({type: "POST",
        url: _baseurl + "/index.php/",       
        data: str,       
        success: function (results)  {
        
By: Tech writer  |   Total Read: 1391  |   Read more..

How to open pop up window at the centre of a screen  

function open_popwin(url) {
         var width = 690;
        var height = 630;
        var bgc = '#ffffff';
        var left = parseInt((screen.availWidth/2) - (width/2));
        var top = parseInt((screen.availHeight/2) - (height/2));
  &nb  
By: Tech writer  |   Total Read: 1012  |   Read more..
Top 15 Posts
Google+