Newest jquery Questions

Q&A for professional and enthusiast programmers

HTML editable <td> using javascript

so im doing that editable table thingy and I found a good example to start through but I have faced some problems. <td contenteditable="true" class="hover" onBlur="saveToDatabase(this,'question','...

Trouble displaying several images from folder

Hey guys im having trouble displaying several images using Ajax and jQuery. After going through the code several times I couldnt find out why the images are not displaying, im not sure if im looking ...

jQuery if url:contains not conditioning

I am trying to simply display a RSS feed only if the user is on a certain page, I would like to use if url:contains due to how my site is built. But currently it's displaying my feed regardless and ...

Moving divs around in Wordpress

So I have 2 problems in Wordpress which both have to do with moving divs around. The first problem is that I want the title and thumbnail to switch places in all posts that are shown in the sidebar (...

Make animation like on this site

Is there any js library which can help me to do the same animation like on this ap*le site, please scroll to the "Learn more" button and try it. I need the same animation...slow and pretty. Maybe an ...

What is the right way to extend twitter bootstrap regarding ul li background image

I want to have an own background image for a dropdown menu (that is done via unordered list and list items -> ul and li). What is the adequate way to realize this with twitter bootstrap? Code ...

Using Jquery in webpack angular2 project

Using: http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/ From angular2 quickstart tutorial. webpack.config.vendor.js plugins: [ extractCSS, new webpack....

Scroll up to an element from bottom of the page

I'd like to scroll to the button that is placed approx 300px from the bottom of the page. So, anytime when it is pressed, the body should scroll up or down so that the button always gets at the ...

capture content of div as image

I want to capture the div as an image after the image is adjusted with zoom and drag within the div. I am using this plugin http://www.jqueryscript.net/zoom/Smart-jQuery-Pan-Zoom-Plugin-Smart-jQuery-...

Clearing Timeout on hover jquery

I am having some trouble with clearing the timeout set on showing the tooltip. I believe I understand how it works, but for some reason it doesn't work here. $('.div').hover( function(){ var t = ...

Force Buffering in whole video while Paused

I want to make the JWPlayer to buffer whole video while in "paused" state. I used this according to JWPlayer API Reference: playerInstance.getState("paused", function() { playerInstance....

Issue creating featherlight gallery manually in JS with a list of hrefs: 'TypeError: c.first is not a function

I'm attempting to create a featherlight gallery manually in Javascript, providing a list of hrefs (list of simple path strings) using: $.featherlightGallery(images); But upon trying this, I get '...

jQuery doesn't like breaks in strings? [duplicate]

I'm writing some jQuery to modify options in a form. I noticed that when I use .append() for multiple elements at once it will work like this: $("#item").append("<option>Item 1</option>&...

GoDaddy running wrong javaScript file

On my domain I have linked a javaScript file to my html and uploaded it. There was an old version of this file on my server but now I have updated it. When I open it in Cpanel's editor the file is the ...

Hide tab based on language selection

I'm trying to hide the other tab (the label and the tab itself) when a language is selected. I can't understand what I'm doing wrong, I tried to change different times the code but there is something ...

No action on click for button in jQuery [duplicate]

I'm building a UI where a user can click on an item in an 'Options' list and add it to a 'Selected' list. The items on the 'Selected' list have a remove button to send it back to the 'Options' list. ...

Convert Sql-Server DateTime to M/D/Y Format [duplicate]

I want to convert a sql-server dateTime variable to MDY format. Here is what it looks like : 2016-12-30 21:34:56.840 I would like it to look like : 12/30/2016

Setting message unread

My code marks messages as read only if i click on that button with this function: var unreadMessageCount = 0, lastReadAt, unreadMessageIndex, $...

Undefined Object Jquery/javacript

I'm trying to figure out the Eventbrite api and I've gotten something to work, but not what I want. Below is my code. The first script works. The second one does not and yields this error: ...

Changing input value dynamically before submit/page refresh?

I want to have a hidden input value as either "0" or "1" depending on whether or not a user fills out the phone number field. This is my current code: <script> if(document.getElementById('user-...

Sequencing Animations JQuery/Velocityjs

Essentially, I have multiple divs with the same class name (so like: <div class = "tile"></div> <div class = "tile"></div> <div class = "tile"></div> <div class ...

jQuery not updating after window resize / positioning

If you make browser window smaller, refresh the page and maximize the window, the navigation bar will be in the same place instead of sticking to the bottom (it goes back to bottom when you refresh ...

Add event delegation in jquery

New to jQuery and I have a question about event delegation. Here below is a series of codes from javascript book HTML: <ul class="accordion"> <li> <button class="accordion-...

How to select multiple options in Select2 dropdown on load?

I'm trying to load an array of selected items into an existing select2 dropdown, so that there are pre-selected items on load, but i'm struggling to get my syntax correct. Give the following json ...

jquery gallery carrousel with dot

I am finishing an work for a Gallery Carousel, and i'm only stuck on the jquery function. The gallery fades every 2.5 seconds, but when i click on a dot, i can remove the class active from the last ...

Jquery slider on divs hide whole div when trying to slide

I'm trying to make Jquery function that slide between 4 divs. first it checks if the first div is the active one and hides the previous arrow and if the last div is the active one it hides the next ...

Item not aligning to center - LightGallery and Isotope

I'm trying to create a centered alignment for the items of the LightGallery, I tried many CSS properties but no use, I even tried to do it with Isotope itself. Now the thing is I've to do this in css ...

Add image uploading function inside this existing ajax code

My code here works fine except image uploading. It inserts all data in database . <input type="file" name="image2" class="file" id="imgInp"/> But after adding file type input in php it is ...

Merging ifs in jQuery

Hi I'm working on Datatables and I'm just a jQuery beginner. I want to merge some of the JSON output through the DT render property. I tried this: function ( data, type, full ) { return full["a"] + ...

jquery onclick toggle image src

I put together this code here: $('img').on({ 'click': function() { var src = ($(this).attr('src') === 'memes/2a.png') ? 'memes/2b.png' : 'memes/2a.png'; ...

fetching JSON array data from localstorage and displaying it in the html dynamically

I have a created a form page with input fields "fname","emailId","phoneNo". No I am creating a JSON array and storing the details in the local storage like this: <script> var jsonArr=[]; ...

cut and paste html to other element

I need cut and paste text with all tags inside from main span to label element in every p tag. <form> <p> <input...> <label...> <span>Will ...

Dynamic CSS color gradients based on number selected items

I am trying set the background color of div boxes in increasing gradients based on the specific CSS items found/discovered on the page. (I looked here and here but they did not address the calculation ...

JQuery-Chosen dropdown stops working after innerHTML edit

I am using the JQuery extension Chosen for a dropdown in a table. I'm using javascript to add rows to the table, but when I add a row the chosen box on the last row is the only one that works. To ...

Is there a more effective solution than callbacks in my scenario?

I have a simple function, which is part of a plugin. ('#typed').typeIt({ strings: "Hello there.", speed: 100, autoStart: false, }) .tiPause(1000) .tiDelete(); The code simply writes out a string ...

Dynamically load json flat file data into new <li> elements

I'm trying to use json flat file data to: Generate new list items Populate specific classes within the new list items My json file looks like this: { "event": { "title": "Title of thing", ...

jQuery scripts occasionally don't work

Beginner here. My site - [www.robbiedawson.com][1] - occasionally fails to load any of the text in the grey footer, including numbers, and links, preventing navigation. I'm encountering this on ...

click button programatically in update panel by java script

I have linkbutton in update panel <asp:UpdatePanel ID="up2" runat="server" > <ContentTemplate> <asp:LinkButton ID="rebindreorder" ClientIDMode="Static" ...

background threads in jquery, javascript

let me start with an example.. I am working on my web (Java work) and I am using AJAX to dump a big data in db. I am running an separate thread for it. That works exactly in a way I expect. But I'm ...

How to make the label next to an input tag equal the placeholder

I was just trying to figure out how to imitate the input's placeholder in the nearest label tag. jQuery is the way of course. My code looks something like this: <div class="group"> <...

Prototyping in jQuery using $.fn on native functions

In context of this question, lets assume I used (function($){ //stuff I did in order to prototype in here })(jQuery) Now, I know how to define new functions, but I tried my best to change .position(...

setInterval() causing maximum stack call size exceeded error?

I'm getting a "maximum stack call size exceeded" error after running the code below for a while. setInterval()should be able to run recursively seamlessly, so I'm not yet sure that the error is being ...

Dynamically moving table cells when window changes size

I have a script that displays rows and columns and at the moment I have the follwoing code which has a variable to limit the number of columns in each row. $Limit2 = 18; $Count2 = 0; if($Count2 < ...

CSS Background Image loads the half-size

I have a problem, in CSS I included an image as background but it load or show just the half size... My Code: CSS: html, body { margin: 0; padding: 0; } #background { background-image: url("../...

Grow Canvas to fit following div

I have a canvas which I want to be 100% screen width and at least 100% screen height, but more if the following div goes beyond the bottom of the screen. I am filling the canvas using Trianglify. I ...

Dynamic HTML Form with an Inner Dynamic Field To JSON

I recently developed a webpage that allows the creation of past question in form of a quiz. Just wanted to know if this code is correctly written or any possible full adjustment <div class="...

take :first elem img src content and pop 2nd elem bg-img property (featured img in WP)

I have external RSS feeds populating the below reoccurring class elements. <div class="featimg">{teaserImage}</div> <div class="featimg">{teaserImage}</div> <div class="...

make if statement based on current URL (without specifying)

So, I'm basically trying to display specific RSS feeds based on the current URL. I have got somewhat there with the below solution, but I would not like to specify URLs in a variable, but rather check ...

JQuery Ajax returning 0

I'm making simple chat and the ajax/php somehow always returns 0. I have no idea why but I tried many ways and it still don't work. JS: $(document).ready(function() { $("#chat").load("messages....

How to use email address to pass in uri/url?

I'm using jquery to load some document in to a div. I'm using codeigniter. I need to pass an email address of each users in the uri. How can I do that. @ symbols are not allowed to pass in the uri. $...
Translating... 0%