Giter Site home page Giter Site logo

jquery-plugins's People

Contributors

aaccioly avatar abiezerm avatar aceiii avatar aleffnull avatar damintsew avatar jdodds avatar kmjones77 avatar meszaros-lajos-gyorgy avatar mikelikesbikes avatar moura137 avatar nmatpt avatar qyearsley avatar robballou avatar samwm avatar sbhimavarapu avatar tybearius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-plugins's Issues

Decimal places option don't work correctly

Hi,

If you put for example 15.30 to the input which should have only 2 decimal places you cant put any more digits to it anymore. But if you put cursor in the middle and erase 5 so you have 1.30 you then cant add 5 after 1 as will which should be possible. Also selecting whole number in input (cmd+a) and start typing doesn't erase whats already in the input as well.

limit of number

Can I set the min value and max value? (i.e. 0.00 < x < 0.99)
or the length of the number? like the maximum can only 5 significant digit

using with jQuery live?

Is it possible to use the plugin with jQuery live

I have fields that are added to the form after the page load, I would like these to be numeric only, guessing I'll need to manually wire those up?

Plugin (populating selectbox) iterates trough not own array properties

Hi

I've used this plugin on a site where I've prototyped Array object:
"Array.prototype.maxNum = function () {...}"

I've noticed that this property has been included in my select box when this plugin fired.

To avoid this problem, this (line no. 111 in jquery.selectboxes.js):

------------------- CODE ---------------------

for(var item in items)
{
add(this, item, items[item], sO, startindex);
startindex += 1;
}


should have additional check if it is own property:

------------------- CODE ---------------------

for(var item in items)
{
if (items.hasOwnProperty(item)) {
add(this, item, items[item], sO, startindex);
startindex += 1;
}
}


Regards,
Marcin Gosz
[email protected]

This plugin has a problem with decimals

Instead of just recording if the decimal key was pressed, I made a change that fixed what was a pretty annoying bug.

Reproduce this bug:

  1. enter any numeric value with a decimal point.
  2. backspace to delete the decimal portion.
  3. try to type the decimal point at this time.

So to fix it, I changed the condition around line 100 that checks for a flag being true to instead actually inspect the string for the presence of the decimal in the first place. Here's the relevant code:

if($(this).val().indexOf(".") == -1)

I hope this gets migrated into the stock plugin code.

Thanks!

Keyboard cursor issue in Internet Explorer using numeric version 3.1

Using the demo http://code.webmonkey.uk.com/plugins/jquery.numeric/test.html (numeric version 3.1) in Internet Explorer (tested on 9,11) there is an UX issue.

  • When using the keyboard cursor to move from left to right in the input textfield, the cursor automatically selects portions of the text (see screenshot below).
  • Then when trying to move from right to left, the cursor will be blocked.

image

I fixed this issue myself by downloading another version of the numeric plugin (version unknown + not specified) from http://www.texotela.co.uk/code/jquery/numeric/ and modified two lines of code. At Line 58 + 95 changed decimal.charCodeAt(0) to decimal.toString().charCodeAt(0).

Would appreciate if somebody could look at this issue please.

Issue with jQuery 1.4.4

I'm using selectboxes with jQuery 1.3.2 and everything working fine. But when updated jQuery to 1.4.2 or 1.4.4 ajaxAddOption() not working anymore.

EDIT:
Found what's wrong. Due to jQuery 1.4.x strict implementation of JSON I've forgot to put JSON data into brakets. After fix that all working fine :)

sortOptions not working for me.

hi, i hope i'm not missing anything, but i don't think there should be anything i'm missing. the problem i'm having is a mere comment/uncomment problem. if i uncomment the sortOptions lines below the script works fine. Once i uncomment them, the script halts.
any idea why?
thanks!

$('#uploadPic_select').addOption(albName, albName);
$('#manageAlbum_select').addOption(albName, albName, false);
// $('#uploadPic_select').sortOptions(true);
//$('#manageAlbum_select').sortOptions(true);
$('#uploadPic_select').removeOption('createAlbum_select').addOption('createAlbum_select', ls_ca_optn, false);

clearLoadingMessage(); // hides a modal, nothing to do with the select
$('#createAlbumModal_div').jqmHide(); // hides a modal, nothing to do with the select
outputSuccess(ls_acs_txt); // open a modal, nothing to do with select
return false;

selectboxes.js : IOS8 (8.0,8.1) Safari would throw exception on line 42

Hi,

We noticed a strange exception on line 42 of selectboxes.js :

el.cache[o[i].value] = i;

For unknonw reason, on regular web browser, if el.options is empty , it would be

[]

but on IOS 8, it would be

[null]

So I simple wrapped it with a try catch to avoid this strange issue with IOS8. I don't really know if this is a real fix, but just my quick workaround :

try {
    el.cache[o[i].value] = i;
} catch (e) {
}

jqery.numeric.js: Selection by keyboard / Ctrl+A selection

Currently, selection/highlighting of text by keyboard, including Ctrl+A, doesn't work. This is because at the end of the keyup callback function, the selection is reset to be just where the carat (start and of selection are the same).

This could be fixed by modifying the keyup callback to save not the selection start, but also the selection end.

onchange event not called

I have an input control which I use like this

$("#money").numeric(".");

$(#money").change(function() {
alert ("Never called");
});

Any idea what is going on here ?

newbie question -- how to install/initialize

I must missing something obvious. I tried this:

$("#id_letter_types").addOption(data.letter_types, false);

but I'm getting "Uncaught Type Error: Object [object Object] has no method addOption"

(chrome's developer tools tell me that #id_letter_types points to the right stuff, and data.letter_types is fine too)

so I'm guessing that there must be something I have to do in document.ready() to get the addOption function tied to my select widget.

any hints?

Option to disallow separator

Option to disallow usage of a separator. Could be something like this:

$('input').numeric({separator:false})

which would produce a input field with possibility to input integers only without thousand separator, decimal separator and so on.

Tag a release

Hi,

Thanks for your work!
I was wondering if you could tag a release? That would be very helpful!

Thanks in advance :)

Arrows key problems in IE

In IE when using the cursor keys to move through the numbers to edit cursor jumps and selects numbers

Google Crome 9 json sorting prolem

Google crome 9 sort json by key and as a result we get unordered list in the dropdown.

I fixed this problem by adding sortOptions(true) and it works for me

$("#dd_menu_id").addOption(response, false).sortOptions(true);

It would be nice to get these plugins up on bower.

I have SamWM's jquery.numeric REPO up on bower:
http://bower.io/search/?q=jquery_numeric_samw

It would be nice if this was supported and maintained by the author(s) because there are a ton of other copies of jquery.numeric on bower, and they are all the old version. Only have one jquery.numeric up on bower, and it is the authors version.

If someone was to try and use this library with version control, they would have to do some sluething to find the right one.

Simple JQuery Numeric

Hi dear,
Now I using bellow script for format numbers.
it is small and better than ... tested.
with special thanks to my dear friend Mr.Ali Mostafavi.

using example:

.numeric cssClass for just numbers.
.numericAmount cssClass for numbers with thousands separator.
.numericAmountDecimal cssClass for numbers with decimal and thousands separator.

<script tag start ``` $(document).ready(function () { $(".numeric").on('keyup', function () { this.value = this.value.replace(/[^0-9]/, ''); $(this).val(this.value); }); $(".numericAmount").on('keyup', function () { this.value = this.value.replace(/[^0-9]/g, ''); $(this).val(ReplaceNumberWithCommas(this.value)); }); $(".numericAmountDecimal").on('keypress', function (e) { var nkeycode = e.charCode || e.keyCode; var chDecimalDot = String.fromCharCode(nkeycode).toLowerCase(); if (chDecimalDot === ('.').toLowerCase()) { var dotArray = this.value.toString().split('.'); if (dotArray.length > 1) { return false; } else if (this.value == 0) { this.value = '0.'; return false; } } }); $(".numericAmountDecimal").on('keyup', function (e) { this.value = this.value.replace(/[^0-9\.]/g, ''); $(this).val(ReplaceNumberWithCommas(this.value)); }); }); function ReplaceNumberWithCommas(yourNumber) { //Separates the components of the number var n = yourNumber.toString().split("."); //Comma-fies the first part n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); //Combines the two sections return n.join("."); } ``` script tag end>

Delete key not working on decimal numbers

In Firefox if the value in the text box already have a decimal point, then delete key is not working. But back space key will work.

But delete will work in IE and Chrome.

I have a work around for this:

Here is the code snippet I put:

    if(key == decimal.charCodeAt(0)) {
      if(!this.containsDecimal) {
       allow = true;
       this.containsDecimal = true;
      } else    {
      if(key == 46) {
                  if(e.charCode == 0) return true;
                  if(this.containsDecimal) return false;
                  return true;
      }
      allow = false;
      }
    }

Decimal point problem

In Firefox if you remove a decimal point from the input box once, then you can't put a decimal point back.

Workaround for this:

if(!$(this).val() || $(this).val().indexOf('.') == -1) {
this.containsDecimal = false;
}

Put above code snippet above the line : var allow = false;

Sorting order issues in the Dropdown

Hi all,

I was trying to use this plugin and have issues with sorting of the option in the dropdown.

i.e. if i have 6,5,4,3,2,1 as the option which are added into the dropdown using addoption in the same order, in the browser I am getting values 6,2,5,3,4,1.

can any one help with this please ASAP.

note : it is happening in all the browsers

thanks & regards
BK

Browser controls and user-defined functionality broken

(this concerns the numeric text field for me, might be applicable to more)

Explicitely checking for and allowing things like ^V, ^Z, etc. breaks common browser functionality like opening a new tab with ^T. Any hotkeys defined by users will also be denied for no good reason.

Backspace does not working at Opera 11.10

It does not working cause of e.charCode in Opera is undefined.

I have fixed it in jquery.numeric.js file, method $.fn.numeric.keypress in line 84:

else if(key == 8) {
//For Opera..
allow = true;
}

copyOptions Function In Safari

Hello,

I am unable to get the copyOptions function within Select Box Manipulation to fire off in Safari 5. I am not getting any error, it just doesn't function. Works fine in Firefox 3.6.11

Cheers,
Matt

numeric not work in google_crom

Hola bueno eso que el plugin no funciona bien en google crome, no detecta los puntos es decir puedes registrar n puntos en el campo.
haber si le das una chequeadita de todas formas si puedo lo hago y te lo envio jeje

merge jquery.numeric.js with jquery.maskMoney?

Hey guys,

I'm the maintainer of https://github.com/plentz/jquery-maskmoney. I just looked at your source code and options and you do basically the same as we do. What do you guys think about merging the two projects and joining forces?

I'm asking it because I saw as well that you have quite a bit of issues and pull requests open(a few of them we already solved - like #18 #59) and I know the work that is required to maintain an open source project, so more hands and eyes looking at the same code is pretty good.

Well, let me know what do you guys think :)

cc @SamWM @qeny @robballou @aleffnull @mikelikesbikes @aaccioly @ajgon @bruno-cadorette @wayne-zhang @Zolfaghari @chris-allen @eliezer @jalchr @mdreak

Function removeNumeric doesn't have unbind() for "keyup"

$.fn.removeNumeric = function()
{
return this.data("numeric.decimal", null).data("numeric.negative", null).data("numeric.callback", null)
.unbind("keypress", $.fn.numeric.keypress)
.unbind("keyup", $.fn.numeric.keyup)
.unbind("blur", $.fn.numeric.blur);
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.