Quantcast
Channel: User Alexis Abril - Stack Overflow
Browsing all 43 articles
Browse latest View live

Comment by Alexis Abril on Stop a jQuery script

I'm assuming script.js has some methods you're using after your event has fired. You could take these methods and place them inside an object and instantiate the object onclick, instead of loading the...

View Article



Comment by Alexis Abril on How can I write this jQuery snippet more beautiful

This is actually a more performant way to go compared to the universal selector(""). $(..).children() is even faster than calling $("").

View Article

Comment by Alexis Abril on How to truncate links to certain length using any...

@user715679 The above code is correct, however you may be noticing an issue with jQuery 1.5.1 and jsFiddle. Try loading jsFiddle in another browser or with jQuery 1.5 and you should see the correct...

View Article

Comment by Alexis Abril on jQuery: selector question (dash)

I will second Bolt's comment. This works as shown: jsfiddle.net/VW8WP It's possible there is some other markup we're not seeing that is causing issues with your selector.

View Article

Comment by Alexis Abril on jQuery getJSON is throwing error?

When testing locally you should always be using some kind of webserver: webrick, mamp, etc. This is due to browser limitations for making requests to the file system as opposed to an http request.

View Article


Comment by Alexis Abril on How to correctly setup a conditional task with...

Not necessarily an answer to this question, but I was able to refactor the above to match another user's inquiry: stackoverflow.com/questions/2324392/…

View Article

Comment by Alexis Abril on How can I convert string to datetime with format...

Rolled back that edit, although very helpful it should be added as a comment or separate answer.

View Article

Comment by Alexis Abril on How to parse date with date.js

TimeSpan isn't defined within Date.js. It's not in their docs either. I do see a file called timespan that the datejs project uses internally, but if you want to use it, you'll need to include that...

View Article


Comment by Alexis Abril on how do I add a function to jQuery?

This code would add a "parse_int" method to an instance of jQuery, not the jQuery namespace itself. If the OP is looking for just a utility method, just remove the "fn" part.

View Article


Comment by Alexis Abril on who can help me optimized this javascript code?

The 10 in parseInt isn't necessarily the default value. From MDN: "An integer that represents the radix of the above mentioned string. Always specify this parameter to eliminate reader confusion and to...

View Article

Comment by Alexis Abril on Get the least value in JavaScript

Not sure what the downvotes pertain to, the question is simple and straight forward. As for JSON, that stands for JavaScript Object Notation @user2246674

View Article

Comment by Alexis Abril on Formating date values for display in Can.js

@SpencerAvinger That's how we find the actual compute you're binding to your input. canjs.com/docs/can.view.Scope.computeData.html

View Article

Comment by Alexis Abril on CanJS add custom MODEL method

Up voting to offset the down vote. No reason for the down vote was given and this is a legitimate question.

View Article


Comment by Alexis Abril on Where is the Can.List.Sort Plugin documentation?

Just for reference, if OP is still interested in experimenting with that plugin: github.com/bitovi/canjs/blob/master/map/sort/sort.md, github.com/bitovi/canjs/blob/master/map/sort/sort.js

View Article

Comment by Alexis Abril on FuncUnit failing to run tests with PhantomJS

Just a quick note: jQuery and syn are actually contained within the funcunit dist. Those two script tags are not required on the test runner(unless you're using them independently for some other purpose)

View Article


jQuery Core/Data or Custom Attributes(Data-Driven)

A similar question was asked here in storing information in a given html element.I'm still green to jQuery, but I'm looking for the best way to store information on the page. I have a Repeater that...

View Article

Answer by Alexis Abril for overriding jQuery.find() function to provide extra...

I actually don't see any fault in your code. It's true the example uses the jQuery prototype("fn"), however you can manipulate $.find as well. I've basically copied the same code you provided in the...

View Article


Answer by Alexis Abril for What is window.Globalization?? It's cited in...

I believe that's the jquery-global plugin. Referenced here: https://github.com/jquery/jquery-ui/blob/master/external/jquery.global.js as a resource. The original is here:...

View Article

Answer by Alexis Abril for How to truncate links to certain length using any...

Just another way to write the same solution as others have provided:$('a').text(function(index, oldText) { return oldText.length > 10 ? oldText.substring(0, 10) +'...' :...

View Article

Answer by Alexis Abril for How to merging javascript arrays and order by...

Eli beat me to the punch up there.var posConcat = function() { var arrays = Array.prototype.slice.call(arguments, 0), newArray = []; while(arrays.some(notEmpty)) { for(var i = 0; i < arrays.length;...

View Article
Browsing all 43 articles
Browse latest View live




Latest Images