uint64 toString Method in C# with Examples

AmitDiwan
Updated on 13-Nov-2019 05:39:06

502 Views

The UInt64.ToString() method in C# is used to convert the numeric value of the current UInt64 instance to its equivalent string representation.SyntaxFollowing is the syntax −public override string ToString();ExampleLet us now see an example to implement the UInt64.ToString() method −using System; public class Demo {    public static void Main(){       ulong val1 = 465656665;       ulong val2 = 232525678;       Console.WriteLine("Value1 (String representation) = "+val1.ToString());       Console.WriteLine("Value2 (String representation) = "+val2.ToString());       bool res = val1.Equals(val2);       Console.WriteLine("Return value (comparison) = "+res);       if (res) ... Read More

Add Class Using jQuery with Example

AmitDiwan
Updated on 12-Nov-2019 12:48:53

560 Views

The addClass() method in jQuery is used to add one or more class names to the selected elements.ExampleLet us now see an example to implement the jQuery addClass() method −    .demo * {       display: block;       border: 3px dashed red;       padding: 3px;       margin: 25px;    }    .one {       border: 2px solid yellow;    }    $(document).ready(function(){       $("span.test").next().addClass("one");    }); Heading One This is our demo text in div. child grandchild grandchild grandchild ... Read More

jQuery finish() Method with Example

AmitDiwan
Updated on 12-Nov-2019 12:44:51

211 Views

The finish() method in jQuery is used to stop the currently-running animations. It removes all queued animations and completes all animations for the selected elements.SyntaxThe syntax is as follows −$(selector).finish(queue)Above, the queue parameter is the name of the queue to stop animation.ExampleLet us now see an example to implement the jQuery finish() method −    div {       background:orange;       height:200px;       width:200px;       padding: 5px;    }    $(document).ready(function(){       $("#begin").click(function(){          $("div").animate({height: 450}, 2000);       });   ... Read More

jQuery focusin Event with Example

AmitDiwan
Updated on 12-Nov-2019 12:40:28

204 Views

The focusin() method in jQuery occurs when an element gets focus.SyntaxThe syntax is as follows −$(selector).focusin(function)ExampleLet us now see an example to implement the jQuery focusin() method −    .demo {       color: blue;    } $(document).ready(function(){    $("input").focusin(function(){       $("p").html("focusin event triggered");    });    $("input").focusout(function(){       $("p").html("focusout event triggered");    }); }); Student Details Student Name: OutputThis will produce the following output −Now, click inside to get focus −Click outside to lose focus −

jQuery First with Example

AmitDiwan
Updated on 12-Nov-2019 12:19:29

183 Views

The first() method in jQuery selects the first element from the specified elements.SyntaxThe syntax is as follows −$(selector).first()ExampleLet us now see an example to implement the jQuery first() method −    $(document).ready(function(){       $("p").first().css("color", "blue");    }); Demo Heading This is a line. This is another line. This is line 3. OutputThis will produce the following output −ExampleLet us see another example −    .one {       background-color: orange;       border: 2px dashed red;    }    $(document).ready(function(){   ... Read More

jQuery fadeToggle Method

AmitDiwan
Updated on 12-Nov-2019 11:59:17

278 Views

The fadeToggle() method in jQuery is used to toggle between the fadeIn() and fadeOut() methods.SyntaxThe syntax is as follows −$(selector).fadeToggle(speed, easing, callback)Above, speed is the speed of the fading effect. The easing can be swing or linear for speed at different animation points. Callback is the function to be executed after the method gets finished.ExampleLet us now see an example to implement the jQuery fadeToggle() method −    $(document).ready(function(){       $(".btnout").click(function(){          $("div").fadeOut();       });       $(".btnin").click(function(){          $("div").fadeIn();       });   ... Read More

jQuery fadeTo Method

AmitDiwan
Updated on 12-Nov-2019 11:56:44

251 Views

The fadeTo() method in jQuery is used to gradually change the opacity for selected elements to a specified opacity.SyntaxThe syntax is as follows −$(selector).fadeTo(speed, opacity, easing, callback)Above, speed is the speed of the fading effect, whereas opacity specifies the opacity to fade to. The easing can be swing or linear for speed at different animation points. Callback is the function to be executed after the method gets finished.ExampleLet us now see an example to implement the jQuery fadeTo() method −    $(document).ready(function(){       $(".btnout").click(function(){          $("div").fadeOut();       });   ... Read More

jQuery Find with Example

AmitDiwan
Updated on 12-Nov-2019 11:54:18

343 Views

The find() method in jQuery is used to return descendant elements of the selected element.SyntaxThe syntax is as follows −$(selector).find(filter)Above, filter is a selector expression to filter the search for descendants.ExampleLet us now see an example to implement the jQuery find() method −    .demo * {       display: block;       border: 2px solid blue;       padding: 5px;       margin: 15px;    }    $(document).ready(function(){       $("ol").find("span").css({"background-color": "orange", "color": "black","border": "3px dashed orange"});    }); body ol ol ol li span OutputThis will produce the following output −

jQuery FadeOut with Example

AmitDiwan
Updated on 12-Nov-2019 11:48:20

207 Views

The fadeOut() method in jQuery is used to change the opacity, for selected elements, from visible to hidden.SyntaxThe syntax is as follows −$(selector).fadeOut(speed, easing, callback)Above, speed is the speed of the fading effect. The easing can be swing or linear for speed at different animation points. Callback is the function to be executed after the method gets finished.ExampleLet us now see an example to implement the jQuery fadeOut() method −    $(document).ready(function(){       $(".btnout").click(function(){          $("div").fadeOut();       });       $(".btnin").click(function(){          $("div").fadeIn();     ... Read More

jQuery Closest with Example

AmitDiwan
Updated on 12-Nov-2019 11:42:48

340 Views

The closest() method in jQuery is used to return the first ancestor of the selected element.SyntaxThe syntax is as follows −$(selector).closest(filter)ExampleLet us now see an example to implement the jQuery closest() method −    .demo * {       display: block;       border: 2px solid blue;       padding: 5px;       margin: 15px;    }    $(document).ready(function(){       $("span").closest("ol").css({"background-color": "orange", "color": "black","border": "3px dashed orange"});    }); body ol ol ol li span OutputThis will produce the following output −

Advertisements