jQuery Hands-on Solution | TCS Fresco Play | Fresco Play | TCS

0
jQuery Hands-on Solution | TCS Fresco Play | Fresco Play


Disclaimer: The primary purpose of providing this solution is to assist and support anyone who are unable to complete these courses due to a technical issue or a lack of expertise. This website's information or data are solely for the purpose of knowledge and education.

Make an effort to understand these solutions and apply them to your Hands-On difficulties. (It is not advisable that copy and paste these solutions).

All Question of the MCQs Present Below for Ease Use Ctrl + F with the question name to find the Question. All the Best!

If you found answer for any of the questions is wrong. Please do mention in the comment section, could be useful for others. Thanks!

_______________________________________

Code for Hands-On

Try it Out - Animations, Try it Out - DOM Manipulation, Try it Out - AJAX calls

*****even though topic is animation, DOM Manipulation and AJAX calls, login code completed the hands on :)


do login:

function login() {

  if ($("#username").val() == "admin" && $("#password").val() == "password") {

    alert("You are a valid user");

  } else {

    alert("You are not a valid user");

  }

}


do manipulation:

function login() {

    var uName = $('#username').val();

    var pwd = $('#password').val();

    if(uName == 'admin' && pwd == 'password') {

        doRedirect("home.html");

    }

      else {

        alert('You are not a valid user');

      }

};


function doRedirect(href) {

  window.location = href;

};



Try it Out - Event Handling

function login() {

   var uName = $('#username').val();

    var pwd = $('#password').val();

    if(uName == 'admin' && pwd == 'password') {

        alert('You are a valid user');

    } else {

        alert('You are not a valid user');

    }

};


jQuery Hands-on: Addition of two numbers

function add() {

    var num1 = $('#num1').val();

    var num2 = $('#num2').val();

 

   var total = parseInt(num1) + parseInt(num2);

    $('#total').val(total);

};



Animation :

function hover1(){

  $("#item1-des").slideToggle();

};

function hover2(){

  $("#item1-des").slideToggle();

};

function animate_big(){

    $("#buy").animate(

      {"width": "200px"});

};

function animate_small(){

    $("#buy").animate(

      {"width": "200px"});

};


AJAX

function load_des() {

  $("#item1-des").load( "https://gist.githubusercontent.com/frescoplaylab/8458dd75a120cf0cfbdf45be813d8f03/raw/84784527d760ef1f877f0b4bb02a3a5e12e32f4c/file.html")

};


**************************************************

If you have any queries, please feel free to ask on the comment section.
If you want MCQs and Hands-On solutions for any courses, Please feel free to ask on the comment section too.

Please share and support our page!

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !

Join Telegram Channel

Join MNCAnswers To Get Instant Updates

Join Telegram Channel