Questions tagged [jquery]

jQuery is a JavaScript library. jQuery is a popular cross-browser JavaScript library that facilitates Document Object Model (DOM) traversal, event handling, animations, and AJAX interactions by minimizing the discrepancies across browsers. A question tagged jQuery should be related to jQuery, so jQuery should be used by the code in question, and at least jQuery usage-related elements must be in the question. Consider also adding the JavaScript tag.

jquery
Filter by
Sorted by
Tagged with
2 votes
2 answers
5k views

How to set cursor position in span in contenteditable div

The code below is what I use now, just to set the cursor position to the tail of span var node = document.getElementById("span_first"); var range = document.createRange(); range.setStartAfter(node);...
David Tsui's user avatar
2 votes
2 answers
5k views

jQuery mobile: panel open not triggered after page navigation

I am creating a mobile website using jQuery mobile (1.3). In this site I'm using a panel for my menu, which get activated by the 'bars' button in the top left of the screen or by swiping from left to ...
Jeroen V Leusden's user avatar
2 votes
4 answers
2k views

Within a multi select, I need to be able to get the value of the currently selected option

Edit:I think I have confused you guys with what I need. If I select val1 I need the function to return val1. If I then select val2, with val1 still selected as part of the multi select, I need to ...
user3306752's user avatar
2 votes
1 answer
4k views

$provide.decorator $controller return throw undefined is not a function angularjs

I want to add dynamic controller's script when the controller loaded via view. Here is my files tree: index.html app.js views prod.html cat.html controllers prod.js cat.js I want that when the ...
Mosh Feu's user avatar
  • 28.7k
2 votes
2 answers
2k views

Jquery crashes while parsing large csv file

I have this jquery function which I found on a tutorial site that takes in a csv file input and tablifies it. I tried giving in a large csv file(10,000KB) and my browser crashes. I saw there's a ...
Tania's user avatar
  • 1,895
2 votes
6 answers
22k views

jQuery Count Numbers Up

I'm not any good at javascript, but I'd love to have a nice little animation that counts a number upwards. I've found this on Github, but it's way to slow. (I'm counting a number with 10 decimals). ...
Mats's user avatar
  • 557
2 votes
2 answers
9k views

Don't queue fadeTo(), fadeIn()/fadeOut()

I have the following animations: $('#id').animate({'margin-top': 100, 'margin-left': 100}, {queue: false, duration: 1000}); $('#id2').fadeTo(1000, 1); this seems to be queuing, how can i make sure ...
GManz's user avatar
  • 1,628
2 votes
4 answers
15k views

jquery - show / hide div depending on day and time

I am trying to show a specific div depending on the day and time. So if the Day is between Monday - Friday and the Time is between 9am - 5:30pm, then it will show div = class.open if before or ...
AlwaysLearning's user avatar
2 votes
3 answers
3k views

Cannot pass parameters from View to Controller via JavaScript

Although I manage to send the grid's selected row id to the controller, the url for opening action view cannot be built up (it is created /Controller/Action instead of /Controller/Action/id. So, when ...
Murat Yıldız's user avatar
2 votes
2 answers
1k views

What is the best way to implement multiway toggle using javascript/jQuery?

I have a div that can display 3 images (in the background) each indicating the 'state' of some variable: i.e., partial, full and none. For each of these states I have images: partial.gif, full.gif and ...
PhD's user avatar
  • 11.2k
2 votes
2 answers
14k views

jQuery anchor click, "this", "e.target" - returns url

I've switched from Mootools to jQuery, because I think it has better support. I've got HTML like that: <ul class="menuHandler"> <li class="menuTreeElement activeOpt" id="menuOpt1"> <ul ...
Misiur's user avatar
  • 5,177
2 votes
3 answers
3k views

Remove # from value (jQuery)

var current = $(this).attr('href'); alert(current); shows the value with '#' eg '#target' instead of just 'target', what do I modify in the code? Thanks
eozzy's user avatar
  • 67.5k
2 votes
4 answers
4k views

What is the fastest way to create HTML table with data from JavaScript array?

I have the following code to convert my JSON dataset to html table. I want to know if it is the fastest method, or should I use jqote2 with jquery to write template? Requirements: can change col ...
Atul Gupta's user avatar
2 votes
1 answer
697 views

Why Circular Content Carousel jQuery plugin does not work with Bootstrap 3

I have been trying to add a jquery carousel to my website which is nearly completely based on bootstrap 3. the problem is that the carousel which I added is not working. All the slides in the ...
Vinay Kumar's user avatar
2 votes
1 answer
1k views

Extend a JavaScript object by passing a string with the path and a value

Is there an easy way to extend a JavaScript object by passing a string and a value? Basically I need something like this: myObject = {} var extendObj = function(obj, path, value){ } var path = "a....
Marco C's user avatar
  • 3,111
2 votes
3 answers
1k views

How to build a javascript preloader for images

I have a page of thumbnails which change their opacity with a hover with a image swap script built in jquery. However When I run it on a live website it is slow and you have to wait for the second ...
Cool Guy Yo's user avatar
  • 6,010
2 votes
1 answer
2k views

Programatically disable series on nvd3 Horizontal Multi-Bar Chart

The issue is that I have a lot of series on my chart and, on load, I would like only 3 selected. Is there a way to 'disable' ( hide ) a series on nvd3 Horizontal Multi-Bar Chart? ( I'm looking for ...
dani herrera's user avatar
  • 50.4k
2 votes
1 answer
2k views

Disabling button after disable_with

In my Rails app, I use the :disable_with helper on a form button. That form works via ajax. If the object is created successfully, I want to keep that button disabled. So in my create.js.erb file I ...
mises's user avatar
  • 125
2 votes
3 answers
5k views

Updating ASP.NET server-rendered controls using ajax

This question got me thinking about how one might go about doing the relatively undoable: seamlessly integrate server-generated HTML from ASP.NET with client-side control via javascript. Sure, you can ...
Jamie Treworgy's user avatar
2 votes
4 answers
8k views

Retrieving stock updates using Yahoo Finance

Basically what i am trying do is retrieving stock quotes for specific company . In my code I am giving symbol of specific company(eg:FB) in a textbox(symb) and when i click the button(getupdate) it ...
Deepesh Shetty's user avatar
2 votes
2 answers
12k views

How do I create a jQuery preloader with a percentage counter?

I have written this code I learnt from a beginners jQuery book, which works great as a preloader for the page, but how do i create a percentage (%) counter for it? - Based upon how much body content ...
Karlgoldstraw's user avatar
2 votes
1 answer
2k views

JQuery form validation and submit scripts conflict

Built a simple JQuery/Ajax newsletter signup form, then went back after the fact to add JQuery validation. I'm not very experienced with javascript/jquery; been working on this for days and am flat ...
Bob S.'s user avatar
  • 23
2 votes
2 answers
4k views

CKEditor disable auto-editing HTML code

I need in one of my CKEditors to disable autoediting code. If I put this code as HTML: <div class="kontaktJeden"> <div class="obr"> <img src="images/...
Lkopo's user avatar
  • 4,858
2 votes
1 answer
395 views

JavaScript Submithandler Issue

$("#myform").validate({ submitHandler: function (form) { var cboxes = ($('input:checkbox:checked').filter(":checked").length); var nboxes = ($(":checkbox:not(:checked)")...
HaBo's user avatar
  • 14.2k
2 votes
3 answers
1k views

How to make cross domain request using ajax or javascript?

I have some Pre built script that makes some ajax request to one website. And it's working fine. But I am not able to make request to there some domains. My working Process:- 1) I have pre built ...
Pankaj Mishra's user avatar
2 votes
3 answers
6k views

JQuery slideUp horizontal menu instead of slideDown

I have this menu : <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script> <script> $(function() ...
codea's user avatar
  • 1,252
2 votes
3 answers
914 views

Disable jQuery mobile button

I am trying to disable this button <a data-role="button" id="next" data-icon="arrow-r" >Next</a> The click event should not fire and the button UI should also reflect a button ...
kolexinfos's user avatar
  • 1,040
2 votes
1 answer
9k views

jquery pulsating text

I'm using jquery to pulsate text. All fine - but I can't get my head around something: I would only like to pulsate x-number of times and then stop. I'm using the following code to pulsate a class: $(...
Mark Nolan's user avatar
2 votes
2 answers
2k views

Parse xml tag attributes using Javascript or Jquery?

I have one xml. Example XML is given below <company sample="text"> <employee id="001" sex="M" age="20">Premshree Pillai</employee> </company> I need to get company attribute ...
Padmanathan J's user avatar
2 votes
2 answers
153 views

Clever work-around for my current script?

I'm currently utilizing JavaScript to allow users to watch multiple videos on a page. There is one big player at the top of the page, and below it are smaller thumbnails of more videos. In theory, ...
Isaiah Y's user avatar
2 votes
1 answer
1k views

Trouble Attaching Call Back to Unobtrusive Validation Show Error

I'm having trouble attaching a call back to jquery unobtrusive validate. What I want to do is hide an informational message any time a field validation error is shown. They both take up the same area ...
Robert Garrett's user avatar
2 votes
1 answer
1k views

Jquery DataTable Horizontol Scroll

Am using Jquery DataTable(http://datatables.net). Am trying with some demo for Horizontol Scroll bar When i set the "sScrollX" property. My DataTable DOM is like below one <div class="...
Peru's user avatar
  • 2,921
2 votes
2 answers
582 views

Mustache.js - How to hook up data?

I like to generate markup and at the same time adding data to nodes in the markup with jQuerys data method Store arbitrary data associated with the matched elements. Is there some way to do that with ...
Björn's user avatar
  • 13k
2 votes
2 answers
3k views

Unable to submit a form on the first click event

Well, I spent hours on this problem and scanned the whole stackoverflow, but still do not know what to do. But what really gets me nuts is that such a trivial and the simplest in the world thing is ...
Jacobian's user avatar
  • 10.5k
2 votes
4 answers
9k views

how to change text paragraph(<p>) on mouse over

I have some news links, when user moves on that I have to change text of paragraph containing news in details.
nectar's user avatar
  • 9,613
2 votes
4 answers
24k views

jQuery Ajax PHP redirecting to another page

JavaScript file: $.ajax({ type: "POST", url: "ajax.php", data: dataString, success: function(r) { $("#div").html(r); } }); I want to redirect the page to new.php on success ...
nanu146's user avatar
  • 97
2 votes
1 answer
3k views

AjaxFileUpload return download panel when data is json

I use AjaxFileUpload (http://www.phpletter.com/Our-Projects/AjaxFileUpload/ ) to upload a file and get json result type response in struts2 ( code.google.struts2jsonresult.JSONResult ) but browser ...
m0z4rt's user avatar
  • 1,165
2 votes
2 answers
4k views

Prevent Full Postback from __doPostBack

I have a content page that contains the following... UpdatePanel1 - containing Error Display Divs contains update triggers for both buttons UpdatePanel2 - containing process 1 with an asp:...
Tim's user avatar
  • 1,249
2 votes
2 answers
5k views

reload/ reset embedded swf on click

I have various flash movies in tags on my page. Is there any way on click of a button (html) I can restart/ reload the embedded flash movie? Im using: <object data="flash/cvdb_video_cvdb_access....
rpsep2's user avatar
  • 3,101
2 votes
3 answers
24k views

append php in jquery

I'm trying to dynamically create a div to show error messages using jquery. I'm able to use append() to create the HTML easily enough, but I need to call a php variable in order to display the content....
musoNic80's user avatar
  • 3,698
2 votes
1 answer
370 views

IE7: CSS & jQuery: dragging up, dragged item is on top, dragging down: dragged item is below. How do I get both to be on top?

Here is my jsfiddle code: http://jsfiddle.net/SMqR9/16/ You'll notice that in IE7, when you drag an item up, it is visible until it is placed. But if you drag an item down, it somehow has a lower z-...
NullVoxPopuli's user avatar
2 votes
3 answers
2k views

how do i use multple jquery version on the single page?

How do I use multiple jquery version on a single page? I have two different jquery version and both are necessary for different functions but both versions are conflicting each other.if i will use ...
user avatar
2 votes
1 answer
4k views

How can i enter an image url and get an image preview

$('[name="thumbnail"]').on('change', function() { $('img.preview').prop('src', this.value); }); <input name="thumbnail" placeholder="Post image URL here" /> <br /> <img src="...
Wilfredo Turner's user avatar
2 votes
1 answer
2k views

Create simpe thumbnail grid expanding preview with jquery

is there any alternative way to this reference http://tympanus.net/Tutorials/ThumbnailGridExpandingPreview/ , do anyone know the resource, simple step to create function like the link above without a ...
Joey The Whale's user avatar
2 votes
2 answers
378 views

Using GWT widgets as like jQuery Plugins?

Can i use Google GWT Widgets like a jQuery Plugins? For example: Gwt('#a_css_selector').mywidget({some:'prefs'});
Jochen's user avatar
  • 21
2 votes
3 answers
703 views

jQuery finding "selector"

following is my code HTML : <div id = "content" > <div class = "child" >Hello !! </div> </div> Javascript : $(function() { $('#content .child').click(function() { ...
user avatar
2 votes
1 answer
479 views

how to undo jQuery's one() using on()?

I have a click event that needs to be fired not more than once : $(".menuIco").one('click', function() { $(this).menuIcoClick($(this)); }); ...that leads to function : $.fn....
van_folmert's user avatar
  • 4,345
2 votes
2 answers
2k views

Rails ajax form not submitting from within another

I have a Rails 3.2 ajax form that creates a new Room for a Hotel. The new Room ajax form works correctly on the Room index page, but once I embed the new Room ajax form on a Hotel edit page, the form ...
Ryan's user avatar
  • 11.2k
2 votes
2 answers
5k views

jquery click event recursion

I am trying to add a new row and bind a click event when the row before is selected. The problem is that this create a recursive logic as the click function is bound in itself. So currently the first ...
user2495234's user avatar
2 votes
2 answers
18k views

Icons on the right side of the bootstrap navbar

While doing some experimentation with twitter's bootstrap, I am trying to make a navbar with the Brand on the left side, the collapsing menu next to it, and finally a not-expanding set of icons on the ...
Enauofas's user avatar