Breaking News


jQuery replace image src value if has specific character

Questions: I have found this code but it’s not working. jquery $("#comments.comments .avatar-image-container img[src*='SA=s85']").attr("src","").ssyby("blank"); I want to replace src url with the specific character with new src url. How to&Answer: As far I understand your question, you want to replace the source of image if its existing url contains certain …

Read More »

javascript – setInterval is not refresh data every second

Questions: var today = new Date(); var day = today.getDay() var month = today.getMonth(); var year = today.getFullYear() var date = (today.getMonth() + 1) + '/' + today.getDate() + '/' + today.getFullYear(); var time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds(); var dateTime = date + ' …

Read More »

javascript – My file name is the same as my menu name. jquery takes the file name when I click the menu name

Questions: my file name is the same as my menu jquery takes the file name when I click the menu name? $(document).ready(function() { $('#mySidenav > a').on('click', function () { var linkText = $(this).text().toLowerCase(); $("#isi").load("./"(linkText),".html"); $.get("./"(linkText),".html", function(data) { $("#isi").html(data); }); console.log(linkText); return false; }); }); How to&Answer: $(document).ready(function() { $('#mySidenav …

Read More »

jQuery: set active class on selected option

Questions: I’m trying to add the “active” class in an option element but this code gives it to the select element. HTML code Cats Dogs Birds jQuery code $('#category').change(function() { $("#category").removeClass("active"); $(this).addClass("active"); }); How to&Answer: You need to add the class to selected option and remove from any other option …

Read More »

jquery – add a dark mode on click

Questions: i try to put a dark mode with jquery but he do not work i need some help. i want the put the dark mode on click for the id #btntheme but he do not work , i want to be able to switch to colorful theme on clickanybody …

Read More »