Jquery UI icons not loading when using static resource

562    Asked by ankur_3579 in Java , Asked on Apr 22, 2021

When I use a static resource for my jquery UI, the icons are not loading, if I use the CDN links, it loads properly.

Here I referenced the CSS and js for jquery UI but I think the problem is that the CSS code in jquery-ui.theme.min.css is unable to find the path of the image which exists on the static resource. Don’t know why the jquery icon not loading.


Answered by Andrew Jenkins

 I had the same issue with the jquery icon and finally find the solution to add custom styles in the visualforce page to modify the jquery icon path. After the modification, it works as expected now.

The result (The previous and next arrows are icons that were missed before the modification and now they are displayed as expected.) The page

      $j = jQuery.noConflict(); $j(document).ready(function() { $j( "#datepicker" ).datepicker(); } );   .ui-icon, .ui-widget-header .ui-icon, .ui-widget-content .ui-icon{ background-image: url("{!URLFOR($Resource.jQueryUI1121, 'images/ui-icons_444444_256x240.png')}"); }    Date:   

Your Answer

Interviews

Parent Categories