Category : jquery

in our webscrapping project, we expect problems if any one of these elements occur, we did in this way but i think there should be a better way await page.waitForTimeout(() => document.querySelectorAll(`div.ui-dialog-content.ui-widget-content.ui-draggable, #ngiForm > div.fieldcontainer.user-code.pt10 > div.error-wrapper > div, #passwordFC > div.error-wrapper > div, #otpPasswordLabel, div.modal-header.error > h1, .repush `).length); if any of elements occur ..

Read more

I have this code: HTML <div> <img src="https://cdn3.iconfinder.com/data/icons/basic-2-blue-series/64/a-92-128.png" data-src-alt="https://cdn0.iconfinder.com/data/icons/sitemap-kit/64/sitemap_kit-52-128.png" alt="3" /> <img src="https://cdn2.iconfinder.com/data/icons/design-creativity-round/128/11-128.png" data-src-alt="https://cdn3.iconfinder.com/data/icons/flat-set-1/64/flat_set_1-03-128.png" alt="2" /> <img src="https://cdn1.iconfinder.com/data/icons/camera-and-photography-3/64/Person_Image-128.png" data-src-alt="https://cdn1.iconfinder.com/data/icons/modern-universal/32/icon-09-128.png" alt="3" /> </div> JS var overHover = function () { //zibi – efekt overhover var newSourceImg = $(this).data(‘src-alt’); $(this).data(‘src-alt’, $(this).attr(‘src’)); $(this).attr(‘src’, newSourceImg); } $(function() { $(‘img[data-src-alt]’).each(function() { new Image().src = $(this).data(‘src-alt’); }).hover(overHover, overHover); }); How to ..

Read more

In short i have a text having numeric price, i want to add class after (.) for example i have price $49.00 i want .00 in a separate class so that my output should something like this: <p class="pricedigit">$49<span class="adot">.00</span></p> Basically I have no idea how to do this, I just need little help so ..

Read more