indexOf is null error.
Hello, I am new to jquery. I am getting error in jquery.min.js file Some line is showing error saying indexOf is null. I have not referenced this file anywhere in my code. What I am actually doing is this. var filteredRows = jQuery.grep(eval(records).rows, function (elem, index) { var IDValue = elem.toString().split(","); if (IDValue != null) { return jQuery.inArray(parseInt(IDValue[0]), args) > -1; }
Can .ajax method be used to get an image?
I need to have the ability to cancel an image get request. The load method has no cancel or abort method. unbind('load') does not seem to actually cancel the process. In order to have the xhr so that I can call an abort method I was told .ajax would be necessary. But, I have not found a sample of how to use .ajax with datatype = image. Can I just ignore the datatype? Or, is there a different method for handling type type of problem. Using the attr('src') type approach is not appropriate in my situation.
problem with Image src loading
I have script: var nick = chat_jmeno + '.gif'; img = new Image(); img.src = nick; if (img.height != 0) { $('#avatar').attr ('src', nick); } which changes source of image in <img id="avatar src="picture.gif">, but it works in every browser only sometimes. For example in first load of page not, but sometimes after refreshing page, sometimes not. I have feeling, that problem is with speed of loading image to the object or something with cache, but don't know. Firebug console
Jquery addClass to containing li based on a href contents
Hi, I've tried various snippets of code to try to get this working on my Wordpress site but without success. I have a structure: <div class...> <ul> <li class...><a href... </li> <li class...><a href... </li> <li class...><a href... </li> </ul> </div> I am trying to add an additional class to the containing li if the a href contain '/project/' somewhere within it. This is the code I have tried + various other permutations without success. The JQuery is in a linked js file which I know is linked correctly
ScrollTop/ScrollLeft
For some reason I'm having a difficult time getting scrollTop and scrollLeft to work properly. My HTML code is this: <div id="map_container" style="overflow: auto-scroll"> <canvas id="map_data" ></canvas> </div>My Javascript code resizes map_container to fill up a portion of the browser window. When my map is drawn into map_data I want to scroll to a particular spot in it and that is where the problem occurs. The following is a static example that doesn't work: $("#map_container").scrollTop(200);map_container
$.inArray giving error.
Hello, I am new to jquery. I have created an javascript file and in that I am referecing jquery methods. I have referenced below files for using jquery methods. jquery-1.3.2.min.js and jquery-1.8.3.js files in my application In my javascript file what I am doing is I am using this code var filteredRows = jQuery.grep(eval(records).rows, function (elem, index) { var IDValue = elem.toString().split(","); return jQuery.inArray(IDValue[0], args) > -1;
Speed question - XmlHttpObject
Hi all I am not sure if this is the corrcet place to ask but I always get helpful responses so i thought its worth a try! I have a panel within my website which pulls out and displays customer records. The customer table contains over 10,000 records. I trigger the panel via a button, however the displaying of the panel and the customer records can sometimes take up to 15 seconds via a browser. When I run the query direct on the database I get the results back within 2-3 seconds. I am using the following
Problem using Jquery in navigation menu
Hi, I'm trying to use a Jquery horizontal menu (by modifying navigation.vm menu). I tried different menu (with different jquery version). I have added two <script> tag in the portal_normal.vm. One for jquery.js and one for the menu himself. It works. My menu works well, but, the Liferay dock menu doesn't work any more. If i remove the <script> tag with jquery.sj, the dock works but not my menu. Anyone solve this clue ? Must i upgrade the jquery.js in liferay ? how do i do that ? I'm using liferay
Toggle open on page load
I currently have a toggle on a website, however I want the top section to be open when the page is loaded (at present all sections are closed and open upon user click). What code do I need to make this happen, this is the jquery code I have: // TOGGLES $('.toggle-view li').click(function () { var text = $(this).children('.toggle'); if (text.is(':hidden')) { text.slideDown('fast'); $(this).children('.toggle-title').addClass('tactive'); } else { text.slideUp('fast');
zIndex for dialog not working
Hello, I am opening a jquery dialog on click of button. There are many controls on the page. I have specified and tried many values for zIndex, but then also the dialog gets behind the other divs. This is what I tried to set in the values for the div. var description = 'some value'; $("#divDrawableRegion").html(description).dialog({ height: 390, width: 380, title: title, "buttons": [ { text: "Close",
checked and unchecked other checkbox of unorder list
I have list item like this <ul class="location> <li> <a href="#"> "<input type="checkbox" id="1" /></a> </li> <li> <a href="#"> "<input type="checkbox" id="2" /></a> <li> <li> <a href="#"> "<input type="checkbox" id="3" /></a> </li> </ul> how can checked only one checkbox when user click on li item and other checkbox will be unchecked if have checked before. Pls help me, thank you for reading my topic.
I am having an issue with $.ajax while trying to post a form
Hi so i have a forum within forum something like this <form id="parent" method="post" action="sucess.php> <form id="additionDriverForm"> <input type="submit" value="add sub" /> </form> <input type="submit" value="add main" /> </form> this is my jquery code <script type="text/javascript"> /* attach a submit handler to the form */ $("#additionDriverForm").submit(function(event) { /* stop form from submitting normally */
Restricting select to a specific div
I have a table and I want to find a specific row and move it to the end. I do that with this code: var failLegend = $(".jqplot-table-legend tbody tr").filter(function() { return $(this).text() == "GA Fails"; }).closest("tr"); failLegend.insertAfter($(".jqplot-table-legend tbody tr:last")); That works fine as long as I have just one table. But I have multiple tables all with the same class, and I end up with all of the "GA Fails" rows from all the tables an the end of the last
Generate this type of window with jQuery
Hi! First of all, thanks for reading! I was wondering if it's possible to generate this with jQuery. I know, obviously, how to create a normal window with a javascript function but i don't need to create a HTML page in a new window, what i need is to generate something like prompt does, but with more options. Imagine a prompt window with a lot of textboxes. I don't know if i explain myselft right, sorry for my english! Thanks!
$.Ajax request memory consume
Hi, I am having problem with the $.Ajax request. In each request that my timer function does the browser increases his memory and decreases. The problem is that the decrease is inferior than the increase. This means that after some time the browser is consuming a total of 2GB of memory... Is there anybody with same problem? My jquery version is the 1.8.2. Thank you!
.push: creates new object instead of overwriting the same
Hi, I searched a lot and tried a lot of things but I can't get it to work. Currently, if I press the button th first time it pushes the data to the array which is fine. But if I press the second or third time the button it creates a new object in the array. How can I avoid that? It should just overwrite it. Hope someone can give me a hint. Thanks in advance. Here's a simplified code just with the problem: var Validator = { data_checked_result: [], errors: [], addRule: function (finder,
Use array from txt file and scan for matching div id's?
Not sure if this is possible with Jquery, but can you load an array from a txt file - eg 1,34,89,45 Then use this array to change the html contained within a corresponding div id <div id="1"><a href="#asdfiuhasdfoih">Text 1</a></div> <div id="2"><a href="#asdfi">Text 1</a></div> <div id="45"><a href="#asdfiuhasd">Text 1</a></div> <div id="5"><a href="#fiuhasdfdf">Text 1</a></div> <div id="34"><a href="#dfiu">Text 1</a></div> The bold line ids match the txt file, so I would change the html inside
validation error messages
Can anyone please point me in the right direction for the various methods of validation. Currently I have a form that I validate using Javascript (see below). what I need is when the user submits if a field isnt entered then the whole row is highlighted ALSO An asterix placed inline at the end of the row (all in line with other rows) Any othr techniques you know of. Cheers Darryl <tr><td><a href="#" onclick="validateform();"><button>What's not completed</button></a></td></tr> <tr id="1"><td
Fire selected indexed changed event for dropdown using jquery
Hi , I am new to JQuery, I trying to fire selected index change event of drop down using JQuery using change () method But its not working. Below is my code. $(document.ready(function(){$('ct100$cphgmslayout$?UsrCtrl$ddlFormat').live('change',function(event){alert("a");});}); Control is inside usercontrol. Control Name : ddlFormat Im using ie 9 . Please help me out. Regards, Akki
Make entire div a link to different things depending on its class
new to Jquery, not rly understanding how to do arrays with it yet and I was wondering how to make a div into a link depending on its class, as well as make it link to different things depending on its class (example below). css - .a (link to domain.com/a) .b (link to domain.com/b) .c (link to domain.com/c) HTML <div class="a"> <div>
Jquery Selector
<div>no id</div> <div id="hey">with id</div> <div id="there" data-thread-id="248088011" >has an id</div> <div data-thread-id="248088010"> ABC</div> I need to hide all divs except the div there data-thread-id="248088010"? any help guys!
Need help with my slidetoggle function
I currently have a slidetoggle function which is working great! What my next goal is, is to create a link inside the div that i'm slide toggling, that will close the parent div that it is in. Here my code so far... /*JQ - EXPAND PANELS ON CLICK*/ $('#panels .expand').click(function(e){ e.preventDefault(); var mclass=$(this).attr('class').split(' ')[1]; var $mcontent = $("#" + mclass); $mcontent.slideToggle('slow', function(){ mthis = $(this); if (mthis.is(':hidden')) { mthis.prev().css({'background-image':'url("images/arrow-down.png")'});
list as horizontal elements rather than Vertical
I want to show dynamic data in a list as horizontal elements rather than Vertical , the default behaviour Can anyone suggest how can I show Dynamic Data setting in JavaScript and show it in a Horizontal way. If not list any other way I can show dynamic data horizontally. Each Visual elements are images so rather than showing Vertically, it looks good if shown horizontally. Please guide.
Help fading an image
Here is the website I am tring to build http://kellymacphee.com/test/portfolio.html Each picture has one behind it, and I am trying to get the top image to fade when hovered so you can see the one underneath it, but all it does is fade both images. I have tried using img:first, but doesn't seem to be working. Can anyone help?? Thanks
Need help on custom design jquery tool
Hi, I developed a custom design tool using jquery, where people can design their mobile covers using the design tool, and then they can save or add to cart. The thing is I couldn't able to save the image they design from the tool. Here is the link, http://staunchire.com/clients/inkblaze/choose_device.php Looking forward to your assistance and help. Thanks much.
need help, need name jQuery slider ... pleace
Could some of you please help me find the name for slider above the footer!? I am trying to find that slider name and I would very much appreciate someones help. http://www.yootheme.com/demo/wordpress/sync
How to simulate mouse right click event using jquery
Dear all, I have a problem with simulate a right click event. I'm writing an auto program. $(selector).click() just simulate left click event Anyone can help me please? Ps: I need to simulate this event, not catch the event that user right click.
Creating an infinite loop animation
Sorry, folks, I'm new but not altogether green. Here's the scenario: I have an image gallery of ten images in a footer DIV. I want the images to scroll, then repeat seamlessly from the last image back to the first. I also want it to run continuously until an image is clicked or the user clicks an arrow (left or right). I'm thinking of how to reload the series at the tail end of the previous series. Right now, the images are set up in an unordered list. The list is displayed horizontally, and is meant
Select part of 'src' name and change that part
Be aware: I'm quite new to jQuery and JavaScript. First of all, I'm trying to select only part of an img src name. For instance, if it's <img src="image1-reg.png" />, I only want to select "reg.png". Next I would like to replace the select text ("reg.png") with something else (e.g. "over.png"), while also keeping "image-" as part of the src name. I want to accomplish all of this within a hover function, so that the image changes on hover. What can I do to accomplish this or something that yields
.prop() checkbox change and .change event.
Hi. I have over 200 checkboxes on a page. User has an option of Select All. Where I use .prop to set the state of the checkbox. I have other events bound to the selection of these chekboxes but those are not triggering. So I called .change() on the checkboxes which extremely slowed down the selection of my checkboxes. Does anyone have an idea how I can solve this issue?
multiple pages
hi i'm looking to have the same jquery cycle slideshow on a number of pages. rather than copy and paste the jquery over these multiple pages is there a way to set it up in a seperate html or js file and call-in / import that file name into the pages it is displayed on? thanks
JavaScript to jQuery
How would I change the following inline code into jQuery? <select name="month" id="month" onchange="setDay();"> <script type="text/javascript"> var monthsArray = new Array("", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); for(var i=1; i<monthsArray.length; i++) { document.write('<option value="' + i + '">' + monthsArray[i] + '</option>'); } </script> </select>
Jquery listener event for innerhtml
I'm pretty new to jquery so am not too knowledgeable on it, I asked a question on using jquery to change the class of certain elements to specific classes if another certain element is present It seems that an event listener is needed for this, I have a basic understanding of event handlers but this is generally to do with actions such as click etc what I need however is one to Id if certain elements innerhtml has a text value (e.g. 'go') to run a function on near by elements (example below). This
Random tab in variable?
$('[id="btn_gen"]').text('Generating...'); $('[id="btn_gen"]').attr('disabled','disabled'); user = $('[name="name"]').val(); $.ajax({ url: 'jsinc_generate.php?username='+user }).done(function( sig ){ if(sig == 'floodlimit'){ alert('You cannot create anther signature until it\'s been ten minutes since the time of your last generated signature.'); }else{ $('[id="gen_form"]').toggle('slow', function(){ url = 'http://novatops.hostzi.com/sigs/'+ sig +'.png'; $('[id="gen_form"]').html('<img src="'+url+'"></img><br/><br/><table><tr><td><b>Direct:</b></td><td><input
Error in Eclipse environment with jQuery 1.9.0 (and 1.8.3)
Hi All, I just added the production (min) version 1.9.0 of jQuery to my Eclipse environment and it is generating an error. I'm not seeing the error in the development versions. Here's the error message: Syntax error, insert ")" to complete PrimaryNoNewArray I can turn off error reporting for that file in Eclipse but I was hoping to avoid that if possible. Has anyone else seen this problem? Thanks! Kelly
Change certain element classes to specific classes if certain other element is present
Hi there I'm trying to code a blog theme which will have tags etc so wat I'd like is for certain classes of mostly parent divs to change when tagged with something (example below). classes are spans (using bootstrap) html <div id="a" class="span6"> </div> <div id="b" class="span6"> <a class="taglink">[tag]</a> </div> What I'd like is for div a and b's classes to change to say span12, and *only* them and no other parent/adjacent/child etc divs. This is so that when I tag the post with certain tags
The car does not move, i dont know why
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery-ui.js"></script> <script type="text/javascript" src="js/js.js"></script> <link rel="stylesheet" "text/css" href="estilo/estilo.css"
[jQuery] IE8 & BlockUI incompatible
There was a thread about this last month that identified a problem with the use of setExpression in BlockUI. IE8 throws a not implemented exception in this case. The author noted that the BlockUI demo page works fine in IE8, which it does. To be honest, I'm not sure why. However, the problem does appear to exist, and it is caused by the use of dynamic properties which have been deprecated in IE8: http://msdn.microsoft.com/en-us/library/ms537634.aspx BlockUI uses expressions to set the height, width,
expanding select options on open
I've seen this before but I can't find it. It's either javascript or jQuery that expands the options of a select box when it opens. It's used when the select is in an area that doesn't afford a lot of space. Before it's opened it's a fixed width. On open the options expand out to full size. The select doesn't expand in it's space, the options appear below it much like a drop down list menu on this page: http://www.webdesigndev.com/wp-content/uploads/2009/07/fancydropdown.html Is there such a
dynamic links on click error
I have a form that takes a form input and stores it into the back-end database then on success I output all the entries via JSON into a ul list with a dynamic link after each for editing purposes. I have a listener for .on("click" event but that didn't work and I used .on because .live I read was being depreciated it. However the only way the dynamically created link would then fire is if I changed the listener back to .live("click", . Am I just using .on incorrectly or is there something else?
Next Page