PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, July 21, 2022

[FIXED] Why jquery not working on this page but it works on other Normal pages

 July 21, 2022     append, contains, html     No comments   

Issue

I have this jquery that can detect the sentence and add the span on it

https://cognitive-assessment.iwi.unisg.dev/submission/?mode=preview&token=c5e77101c559cd672654248f52d5692a

this is the page where i want to run jquery

you have to login to view the page

Username:ABC paswword:ABC@@99

jQuery(document).ready(function( $ ){
  
$("h5:contains('Medium Overall Feasibility of Use Case')").html(function(_, html) {
   return html.replace(/(Medium Overall Feasibility of Use Case)/g, '<yellow class="yellow">$1</yellow>');
});

});

This is the jQuery that need to run...


Solution

The jQuery snippet you shared works on my side for the page you shared. As a proof of concept, take a look at the following screenshot:

enter image description here

What are the other pages you are referring to ? What exactly doesn't work when you run this code at your side ?

Note: It's always a bad idea to publicly share the credentials of your university account, for security reasons.



Answered By - Nick Papadiochos
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing