Category Archives: java Script

how to print contents of specific div at html?

function printdiv(id) { try{ var x = ”; x = document.getElementById(id).innerHTML; //alert(x);”,’name’,’scrollbars=yes,resizable=yes,height=500,width=500,toolbar=1′); newwindow2.title = “The new title goes here.”; var tmp = newwindow2.document; tmp.write(x); newwindow2.print(); tmp.close(); newwindow2.close(); }catch(err){} } Advertisements

Posted in java Script

childs with Jquery (select,ul)

jQuery(document).ready(function() { jQuery(‘#active_booking_formid :nth-child(2)’).attr(‘selected’, ‘selected’); jQuery(‘#active_booking_formid’).trigger(‘change’); jQuery(‘>li:nth-child(1) a’).addClass(‘menuItem2’); jQuery(‘>li:nth-child(1) a span.t’).addClass(‘specialforhome’); /*jQuery(‘>li:nth-child(3) a’).addClass(‘menuItem2’); // services jQuery(‘>li:nth-child(5) a’).addClass(‘menuItem2’); //contact us */ });

Posted in Jquery | Tagged ,

javascript method for ajax

function getVersionInfo(contentID,version) { $(‘input[name=published]’).removeAttr(‘checked’); //reset publish //alert(version); $.ajax({ url: “/CSAB/Content/selectedversioninfo/”+version+”/”+contentID+””, dataType:”xml”, success: function(xml){ //alert(xml); var phisicalName=find(xml, “phisical-name”); var selectedVersion=find(xml, “selected-version”); var publishedVer=find(xml, “published-ver”); var contents=find(xml, “contents”); $(“#phisicalNameid”).val(phisicalName); $(“#contentsid”).val(contents); } }); } function find(xml, name) { var nodes = xml.documentElement.childNodes; for … Continue reading

Posted in Jquery | Leave a comment

Jquery slideshow with exllent transition see it in action

Posted in Jquery | Leave a comment

good tutorial to start jquery learning

Posted in java Script, Jquery | Tagged , , | Leave a comment