Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
How do I implement a ctrl z in javascript?
After numerous google searches, I stumbled upon the execCommand:
I'm using document.execCommand("undo", false, null), but it doesn't work
with Firefox.
I put in the 2nd and 3rd parameters even though they are optional in Firefox.
Any ideas, insights, suggestions, examples, etc?
Since this hasn't been officially answered I wrote this if this helps at all
Its extends jquery so that it detects ctrl + z. and can be used like this:
$('input').disableUndo();
or if you want it to do something when the user tries to undo
$('input').disableUndo(function(element){
// do custom stuff
});
jsFiddle Demo
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to make a popup with any coding language, I don't mean an error popup with JavaScript but just a div that comes in front and makes the other things grayer.
I hope you understand what I mean, who can help me?
EDIT: I mean something like http://habnote.nl/?utm_source=loggedout (don't matter the website)
Unfortenetly it is possible only on Javascript.
You can either use the simple command alert(Hello world!). Or get it a bit nicer with alert jQuery plugins.
Good luck.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am making a simple web app. At one part of it, I want to show options related to the selected item. I want it to be similar to what wunderlist has done:
As can be seen is this image, there are two items in a list.
Selecting an item leads to a popup - from the side:
I want to add something similar to my site. I know how to have alerts, popups, dialog boxes and models but I do not know how to have this (visible at the right hand side and not center of the screen).
Can someone help me out here?
Demo
I guess this is what you need. May be you can work on this more,
$("#click").click(function () {
$("#popup").animate({left:"335px"});
});
Hope this helps
Thank you
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I want when I click in the select, I see all options on full screen.
I have an example in this link.(By choosing the state)
Note : I don't want to use jQuery mobile.
It's been a few hours I'm looking for this feature, but unfortunately I can not find any result.
Thank you.
Try this plugin, and just set the maxHieght and menuWidth properties to the page size. I would use a dynamic calculation, to determine current pages coordinates, then plugin them into the plugins properties. Plugin can be found here: https://github.com/fnagel/jquery-ui/wiki/Selectmenu. Hopefully this will help you out. Happy coding!
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am trying to implement a main-tab which on hover would show sub-tabs
<img src="images\img_Classes.png" />
function displaySubTabs(parentTabId, childTabId) {
$('#' + parentTabId).children().removeClass('show');
$('#' + childTabId).addClass('show');
}
I need to implement the same thing on iPad as well.
Now as onmouseover is not supported on iPad, I need to add onclick as well (Now this can be changed to ontouchstart as well)...But the point is I feel like unnecessarily I am adding 2 handlers..
Is there any way by which I can implement this behavior using a compact way.
I am open to all ideas including moving the implementation from JS to CSS. Anything which is more compact and good approach..
Please suggest.
I would suggest that you exclude your hover functionality entirely for the mobile platform version. Reason being that you explain, it just doesn't work. Just leave the sub menus open, and have them change in accordance to the main tab thats being interacted with.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
As an example, let's assume I want to prevent users from using auto-clickers. Is it possible, and are there accepted best practices when doing this?
Nope, it is not possible. Someone can always turn off JavaScript, modify it, run their own JS-code, etc, etc. JavaScript should never ever be used for security reasons.
However, for AJAX-requests you could implement a minimum interval server-side (like on Stack Overflow).