jQuery spinner arrows not visible

别等时光非礼了梦想. 提交于 2021-02-08 11:10:37

问题


I have seen a previous post on this Jquery Spinner arrows not loading (visibility)

but I still can't seem to load or see the spinner button images, although the spinner works fine. The css file path is: wwwroot/lib/jquery.ui.combined/Content/themes/base/jquery-ui.css and the images are in: wwwroot/lib/jquery.ui.combined/Content/themes/base/images.

I have had no problem in the past using jquery ui and spinners. I again used NuGet (with VS cummunity edition 2015) to get the jquery ui package, which now seems to load things into my windows users folder, so I just dragged the package into my solution. Any pointers would be appreciated.


回答1:


Please do not use Nuget to install Jquery-Ui 1.12.1

The package is Buggy.

I have verified that. The package include a correct Jquery UI JavaScript file for 1.12.1 but is missing the ingredients of the structure and theme files, and it includes Completely WRONG Style Sheets from the older 1.11.4 and 1.12.0

I had to fix them in my project file individually.

What pointed me in this direction to investigate Nuget, was a ticket I opened related to a wrong Dialog cancel text that overflow the Cancel icon, and they pointed me to a mismatch in the style sheet versions, and here you go.

Just download the correct Stable style sheets and script package from http://jqueryui.com/

then Upack the Zip file, and use VS Add-Existing to include the correct images and style sheets to the proper folders under Content/themes/base

The new structure for the Style Sheets is:

  • jquery-ui.css contains all the necessary styles for all Jquery UI elements
  • jquery-ui.structure.css contains the core ui without the theme
  • jquery-ui.theme.css contains the theme

so jquery-ui = jquery-ui.structure + jquery-ui.theme

This way, if you need to use your own custom theme, you can use the jquery-ui.structure along with your theme.

Hope this helps anyone facing the same problem we faced with the Nuget package




回答2:


As per the answers, to the linked question, the answer is really simple.

http://fairyringspores.com/Content/images/ui-icons_6da8d5_256x240.png The image was not found, therefore it does not load anything.

The reason those images don't show, is because they aren't found in the path that you are specifying. Either you have forgotten to upload them, or you've uploaded them to the wrong directory.

So, to solved the problem look inside this wwwroot/lib/jquery.ui.combined/Content/themes/base/images folder for an image ui-icons_6da8d5_256x240.png if it's not there, download a copy of jquery UI, copy and paste the image in question to the folder above.



来源:https://stackoverflow.com/questions/41679184/jquery-spinner-arrows-not-visible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!