How to change the percentage contents of a parent().parent() values in Jquery

Course Queries Syllabus Queries 3 years ago

9.1K 2 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago

 

$("[name=editMarksAccSubmit1]").live('click',function(){
    $syllabus=$(this).attr("data-syllabus");
    $student=$(this).attr("data-studentId");
    $percentage=$(this).attr("data-percentage");
            $marks=$(this).parent().parent().find("[name=marz]").val();
            $AccMarks=$(this).parent().parent().find("[name=mar]").val();
            alert($marks);
            alert($AccMarks);
            $percentage=$(this).parent().parent().find("[name=marz]").val();
            $(this).parent().parent().parent().find("[name=academicMarksAction] > span").html($marks);
            var js={"syllabusId":$(this).attr("data-syllabus"),"studentId":$student,"marks":$marks};
            $.post(url+"admin/Edit/insertValues",js,function(data){
            marksAccClose1();
            },"json");
        }); 

I am able to edit the marks and max-marks,but my question is how to change the percentage automatically when i submit for that particular parent() div and changes in the Total div which is at the bottom of the page

0 views
0 shares

profilepic.png
manpreet 3 years ago

I think, if i understood your question you just need $('#element').parents().eq(1).date(percentage, "value"); or $('#element').parents().eq(1).attr(data-percentage, "value");


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum