- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 300
- Posts with Upvotes
- 268
- Upvoting Members
- 177
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 3
Largely sane.
- Interests
- Vintage steel bicycles, Art Deco ceramics, Achimenes, WWII history, Suzuki Cappuccinos, Hurtigrute.
- PC Specs
- Various. Nothing special. Mostly last Millennium sub-GHz, except my little netbook - new in 2011.
Re: Pretty simple, start with array [1, 2, 3] (representing offsets from current month) and map it to the array you want. function getNext3Months() { const currentMonth = (new Date()).getMonth() + 1; // getMonth() is zero-indexed; add 1 to give conventional month number. return [1, 2, 3].map(n => (currentMonth + n) … | |
Re: Solid, I've been following this but with nothing to offer. Now I know the solution, I understand the problem! My twopenny worth (after the hard work is done) .... it would be slightly(?) more economical to make $(this) just once inside the each loop: [CODE] $('.task-title').each(function() { var $this = … | |
Re: The days of generating a special page for print purposes are long gone. Instead of composing HTML on the fly, try mastering CSS @media rules : * https://www.w3.org/TR/WD-css2/media.html If there's going to be any dynamically generated content, you will still need some javascript; but more typically @media rules alone allow … | |
Re: I posted a link to a fiddle back in the [original post](https://www.daniweb.com/programming/web-development/threads/506905/printing-values-of-jquery-custom-autocomplete#post2213571) | |
Re: As it stands, the question is not 100% self-explanatory, in particular the relationships and juxtapositions of the various input elements. Maybe it would be clearer if you posted an (annotated) screenshot of the original spreadsheet and/or the HTML version. | |
Re: You are expecting javascript arrays to behave like PHP arrays. They don't! Elements of a JS array are indexed exclusively by integer. Confusingly, JS arrays can also be given properties, so `tmp[14]['G'] = foo` is quite legal but not what you might expect from knowledge of PHP. `['G']` is a … | |
Re: The formula will simplify enormously. ((lcost1*24-(dp1/2))/24)+((epay1-(dp1/2))/24) can be written : lcost1 + (epay1 - dp1) / 24 And you probably want to display : (lcost1 + (epay1 - dp1) / 24).toFixed(2) ie rounded to 2 decimal places. | |
Re: Why is this tagged "jQuery" when everything is written in POJS? | |
Re: Dan, I don't know which countdown plugin that is but [URL="http://keith-wood.name/countdownRef.html"]this one[/URL] by Keith Wood has a [iCODE]serverSync[/iCODE] capability and is very well documented. [B]Airshow[/B] | |
Re: Gagan22, A very similar question was answered just a few days ago. Sugest you read the thread and see if it provides an answer: [url]http://www.daniweb.com/forums/thread139039.html[/url] [B]Airshow[/B] | |
Re: Pranab, There is no JavaScript command that activates JavaScript in a browser. Two reasons: [LIST=1][*]If JavaScript is disabled then the JavaScript engine is not running, so no JavaScript commands can be interpreted. [*]If there was a mechanism by which a web page could force JavaScript to be enabled, then this … | |
Re: The double test for `hasChildNodes()`, at parent and child levels, looks a bit odd. I would have thought you want the parse out the nodes that *don't* have children, in which case your loop will be as follows: for (i=0; i<x.length; i++) { if (!x[i].hasChildNodes()) { alert(x[i].nodeName + '=' + … | |
Re: Double_cola, Broj1 is really trying to help you. Do what he says and ANSWER HIS QUESTIONS. Restating the problem and reposting large sections of code is not going to get you to a solution any faster. | |
Re: Surely `cc` can be permanently appended to `.news-grid` and `cd` can be permanently appended to `cc` with `.show()` and `.hide()` controlling visibility? There doesn't appear to be any need to detach/reappend. Even better, `cc`/`cd` could be hard coded in HTML. I'm not sure this will fix anything but should better … | |
Re: Text questions will most likely attract text answers. If you want code, then provide code. | |
Re: Try [jQuery-turtle](https://github.com/PencilCode/jquery-turtle/blob/master/README.md), "a jQuery plugin for turtle graphics". I've not used this plugin but assume that its "accurate collision-testing of turtles with arbitrary convex hulls" can be used for collision detection of turtles with each other, ie. turtlize each of your eggs. You would need to more-or-less restart your coding … | |
Re: signed or unsigned tinyint? | |
Re: "Another PHP programmer" could be interpreted many different ways. | |
Re: Refresh very deliberately reloads the current document in its original state. The only (and very limited) control the user has (in most browsers) is to do a "soft" or "hard" refresh; - Soft: accepts data from cache(s) - Hard: ignores cache(s) and goes back to the original source (sever). Relies … | |
Re: You want something more like : $(".bot").on('mouseenter', function() { $(this).siblings(".over").fadeIn(1000); }).on('mouseleave', function() { $(this).siblings(".over").fadeOut(800); }); This should give the desired behaviour for all .bots that are in place on page load. If .bots (and/or their contents) are dynamically added, then you need to consider delegation, which would be a mild … | |
Re: As I understand it, the NetFront browser's javascript is not fully featured (and has limited HTML5 support). I would guess that, if jQuery loads without error, some aspects of it will work and some won't. If you try, then please post your findings here. | |
Re: I'm not too sure what the question is but here are a few observations from a client-side perspective : 1. Don't use `async:false`!!! AJAX is fundamentally asynchronous and `async:false` should never have been provided. It is, at best, unreliable. 2. You can't rely on an arbitrary cart-entry index to identify … | |
Re: To give the animation every chance of being smooth, make sure there's no **document reflow**. ie. make sure the div animates into a reserved space. eg. wrap `#block` in another div with width and height set to accommodate the div at its maximum size. Also, **chain the jQuery**, so `#block` … | |
Re: > If you're only seeing the code on the site and in the view source then your hosting doesn't have PHP enabled. Or, the source file is otherwise not served via the PHP parer, eg. it does not have a `.php` extension, or the server is set up to recognise … | |
Re: Two things strike me immediately : Click handlers --- Take a look at the following : $(".conjugate").click(function() { conjugate(); }); and $(document).on("click", ".conjugate", function() { conjugate(); }); This means that any ".conjugate" element that is present in the document at page load will fire `conjugate()` *twice* when clicked!!! jQuery selectors … | |
Re: Siberian, read the first line of my signature. | |
Re: As far as I know, you have to inspect the contents of the files and work out whether they do server-side or client-side stuff. I expect that in some cases, the distinction will be manifest, in others less so. | |
Re: It's difficult to answer questions like this when the HTML is in the form of server-side source code (PHP presumably). Please post the served HTML! | |
Re: So how does the mystical `CHtml::activeTextField(...)` render in HTML? |