I would like to show ajax spinner animated gif near mouse position at the moment of mouse click.
How can achieve this?
Regards
p:ajaxStatus at mouse pointer position
Why not do:
http://www.w3schools.com/cssref/playit. ... reval=wait
or
http://www.w3schools.com/cssref/playit. ... l=progress
or even
http://www.w3schools.com/cssref/playit. ... ur%29,auto
Code: Select all
.myAjaxWaitClass {
cursor:wait;
}
or
Code: Select all
.myAjaxProgressClass {
cursor:progress;
}
or even
Code: Select all
.myAjaxCustomCursor {
cursor: url(myImage.gif);
}
Last edited by kukeltje on 30 Mar 2013, 19:49, edited 2 times in total.
Not because showing artistic spinner is betterkukeltje wrote:Why not do:Code: Select all
.myAjaxWaitClass { cursor:wait; }
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hi Ronald,
I've upgraded your account to PrimeFaces Elite.
Please login at;
http://www.primefaces.org/elite/
You should be able to see all the elite stuff available.
Have a nice weekend!
Btw your intercommit email doesn't seem to be working for me.
Optimus
I've upgraded your account to PrimeFaces Elite.
Please login at;
http://www.primefaces.org/elite/
You should be able to see all the elite stuff available.
Have a nice weekend!
Btw your intercommit email doesn't seem to be working for me.
Optimus
Thanks, really appreciate it. I might sometimes have critisism, but really like what is being done. Will send a more detailed response via a new email address (due to a takeover, the former address indeed does not work anymore)
Indeed, progress is better IMO
See also https://stackoverflow.com/questions/157 ... n-progress
Code: Select all
<p:ajaxStatus ...
onstart="$('html').addClass('progress')"
oncomplete="$('html').removeClass('progress')">
...
</p:ajaxStatus>
Code: Select all
html.progress, html.progress * {
cursor: progress !important;
}
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
-
- Posts: 1
- Joined: 02 Aug 2022, 12:00
kukeltje wrote: ↑30 Mar 2013, 19:38Why not do:http://www.w3schools.com/cssref/playit. ... reval=waitCode: Select all
.myAjaxWaitClass { cursor:wait; }
or
http://www.w3schools.com/cssref/playit. ... l=progressCode: Select all
.myAjaxProgressClass { cursor:progress; }
or even
http://www.w3schools.com/cssref/playit. ... ur%29,autoCode: Select all
.myAjaxCustomCursor { cursor: url(myImage.gif); }
You can achieve this with a little help of CSS and jQuery. With CSS, you can create a class which changes the cursor on the entire document. With jQuery, you can add/remove that CSS class. Under the covers, PrimeFaces uses jQuery for the ajax magic and you can for PrimeFaces <4 hook on standard jQuery ajaxStart and ajaxStop events and for PrimeFaces 4+ hook on PrimeFaces specific pfAjaxSend and pfAjaxComplete events to perform the add/remove of that CSS class.
CSS:
html.progress, html.progress * {
cursor: progress !important;
}
(the !important overrides any style set by style attribute and stronger CSS selectors for the case that)
jQuery and PrimeFaces:
$(document).on("ajaxStart pfAjaxSend", function() {
$("html").addClass("progress");
}).on("ajaxStop pfAjaxComplete", function() {
$("html").removeClass("progress");
});
For the case you're also using standard JSF <f:ajax> elsewhere and would like to have the same progress indicator, here's how you can do that:
jsf.ajax.addOnEvent(function(data) {
$("html").toggleClass("progress", data.status == "begin");
});
autoclicker for minecraft
-
- Information
-
Who is online
Users browsing this forum: No registered users and 52 guests