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
TimePickers should conform to ISO8601 5.3.2 on midnight representations, accepting 24:00 as a valid value
ISO 8601 5.3.2 distinguishes between combined date-time representations and time-only (aka time-of-day) representations. The uncombined Time-only type is mapped to the 24-hours of an indeterminate day not on the calendar, which runs from 00:00 to 24:00. With time-only values, 24:00 is an accepted value in order to distinguish the start of the day from the end of the day. [A number of databases are IS08601 5.3.2 compliant in regard to time-only types, with separate datatypes for date-time, time,
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
Calling Click In Each To Open All Dts
Hello everyone. I am pretty new to jQuery and i encountered a problem i could not find in other forums, maybe you guys can help me. I have dts in html and i want to open them all. I have a function called openDt that is pretty simple like this: function OpenDt(){ jQuery(this).next().slideToggle('normal'); And so on.. the use of jQuery(this) is because this is developed for Joomla!. And i got in the document ready a line like this: jQuery('dt').bind("click", OpenDt); And this part is working fine,
Page Displacement on Swipe
I thought that jQuery Mobile included the page displacement on swipe by Default, but i'm working on a new site and I'm unable to get it to work. I'm using the jQm multipage template as a model (see here:http://jquerymobile.com/demos/1.2.0/docs/pages/multipage-template.html) for this site and the only thing that differs is the swipe events defaults have been modified. The new settings can be seen below: $.mobile.defaultPageTransition = 'slide'; $.event.special.swipe.horizontalDistanceThreshold = 150;
getJSON List Daynamic issues
Dear, This is the first time to post here i hope it will help me, my project to create list from database as dynamic and after that i can press on this list and whowing another list and again press and whoing another list so on ...etc , but i have problem in my code i can't see the second list after i click on first list , please see below my codae and let me know what problem here: i think the problrm here "$("#ColList li").click( _updateList);" inthe first time when click not able to go inside
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');
Panel box shadow
I have a listview element in a panel and noticed that the box shadow does not go over the listview. It starts where the listview ends about a third the way down the panel. This makes the effect look broken.I have tried to play with z-index but got no results. .ui-panel-display-reveal { box-shadow: -5px 0 5px rgba(0, 0, 0, 0.15) inset; }
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",
Jquery explode animation
Hi all,On my website I am using hide() and show() animation for a list wich appears when the listmenu is changed and it's writen like this in Js file $('#find').show(1000); $('#find').hide(1000); recently I saw something in Jquery UI website and tried to use it but it didn't work $('#find').show( "explode", {}, 1000 ); my table just become visible and invisible without any animation and sometme it doesn't work either this is the website if you need to look to give me advice http://delimes.ru/
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.
Shopping Cart with Dreamweaver
Hi all, I've almost finished one of my first websites ever. I would just like a little bit of advice about making a more dynamic shopping cart. My site is simple. There is only one product and there are 6 different sizes. We are going to charge tax to Canadians, but not internationally. Then we need to find a good way of incorporating shipping methods. I can handle all of this simply with the free PayPal html codes, but I was wondering if someone had any advice to steer me in a direction so I can
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 */
How to write multiple selected event for combobox
Hi All, I trying to write and execute selected event for multiple drop down lists on single form.... However, its not working... Below is the script which i have written... <script type="text/javascript" src="js/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#YOJ_FLDDEFVIEWTEMPID_dropdownlist_YOJ_FLDDEFVIEWTEMPID").combobox({selected: function(event, ui) { var value1= $(this).val();someFunction(value1);} }); $("#YOJ_FLDKNOWNNAME_dropdownlist_YOJ_FLDKNOWNNAME").combobox({selected:
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
make a list of draggable elements, sortable
Please, look at this semplified code: $('form').submit(function(e) { [...] append submitted element to ul.list [...] $('ul.list').sortable({ //the ul list have to be sortable stop: ... }); $('ul.list li').draggable({ //the li element could be dragged to another div }); } The code above: -add a li element to a list - add sortable behaviour to ul container - add draggable behaviour to li element The purpose is to let the dynamically created li 's to be sortable in the parent list and
jQuery Cycle pager after image
Hi, I really like this plugin and it seams perfekt. Unfortunatly I can't manage to get the pager after / beneath the actual image. My code until now is: jQuery('div#Malerei').before('<div id="nav">'); jQuery('div#Malerei').cycle({timeout: 0,height: 350, pager: '#nav'}); I would be really thankful if someone could give me a clue. It might work with the option pagerAnchorBuilder, but I don't know how.
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
tabs and the print stylesheet
just wondering how i would "disable" tabs for a print style sheet, so that the content of all tabs would be listed and print. roxstyle
Regular expression allowing special character for first key press
Hi, i am trying to use regular expression in jquery on keypress function to allow only Alphanumeric values from text field, but if i press any special character then it is allowing for the first time jquery code $(function() { $("#legalDiv").find(".legalClass").bind("keypress",function(){ if (this.value.match(/[^0-9a-zA-Z]/g)) { return false; } }); }); Html code <div id="legalDiv">Legal Name:<input type="text" name="legalName" class="legalClass" id="legalId"></input></div> output getting
Auto complete doesn't work on dynamically add textboxes
$("#table tr td:last").live("keydown", function (e) { var keyCode = e.keyCode || e.which; if (keyCode == 9) { $("#table tr:last").after("<tr><td><input type='text' style='width: 140px'/></td><td><input type='text' style='width: 140px'/></td><td><input type='text' id='legid' class='acomp' style='width: 140px'/></td><td><input type='text' style='width: 140px'/></td><td><input type='text' style='width: 140px'/></td><td><input type='text'
problems with buttons
Hello im new at jquery ive tryed to design buttons with an animation of rollover, here is the script that i used i need to know is there something wrong with the script thanks Marcos <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <meta http-equiv="Content-Type" content="text/html;
I am using two jQuery plugins on my page, when one runs the other stops working?!
http://www.ruesterprod.com/rpjstest/ On the above page I am using Quicksand and Videolightbox jQuery plugins - when you first load the page, click on one of the video thumbnails and Videolightbox does it's thing, BUT when you click the button labeled "Commercials" at the top (Which triggers the Quicksand plugin and filters the videos) then if you click again on one of the video thumbnails, videolightbox stops working and just brings up the Youtube link... I'm pretty sure this has something to do
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
Loading a file into a div, CSS/UI not applying styles to classes in Firefox, but will in IE, kinda...
Example of what's going on: (".analyzer").click(function () { if ( $(this).attr('id') == 'ct50' ) { $('#analyzers').load('ct50.html'); $('.CT50').show(); } else if ( $(this).attr('id') == 'status' ) { $('#analyzers').load('status.html'); $('.Status').show(); } else if ( $(this).attr('id') == 'plus' ) { $('#analyzers').load('plus.html'); $('.Plus').show(); } else if ( $(this).attr('id') == 'connect' ) { $('#analyzers').load('connect.html'); $('.Plus').show(); } else if ( $(this).attr('id') == 'ct500'
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>
Is this Possible - Dynamic Listview/Trigger Submit Buttons
HI all, i am very new to JQM. I am trying to see if the following is even possible with JQM before starting any development. Any help/input is appreciated 1) Dynamically populating the listview from the database and having "Approve, Reject" buttons on the list view - I think we can do this 2) Clicking on those button should approve the data that is on that line by passing value which are on the same line.
Focus to first tab that contains invalid inputs
I am trying to validate a form and focus on the first tab that contains a invalid input using the jQuery Validate plugin.
JQUERY UI - Dialog UI load $post content
Hi I have this script $('.modifica').click(function(){ var oTBL = document.getElementById('example') var row_number = $(this).closest("tr")[0].rowIndex; alert("row number: "+row_number); var value = oTBL.rows[row_number].cells[0].firstChild.data alert(oTBL.rows[row_number].cells[0].firstChild.data); alert(value); $.post('dati/testuali/test.php',{title: value} , function(resp){ $('<div>').dialog({ modal: true,
Why are popups disrupting my layout?
Basic description of my jQM page from top to bottom: Header bar containing a button and a popup that is opened by clicking the button. An area containing between 1 and 4 HTML5 canvases. Canvases can be added/removed and are resized dynamically to fill the middle part of the window with no spaces between them. A div containing a few buttons and a slider. Everything is in the correct position and dynamically resized when the window is resized. Before the button is clicked, everything is fine. When
jQuery maphilight(), browser compatibility for zoom property
jQuery maphilight(), would highlight the photo on defined coordinates and apply default red stroke on mouseover. The css zoom property is control the magnification level to 50% zooms out of the original photo: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.maphilight.min.js"></script> <script type="text/javascript">$(function() { $(".map").maphilight(); }); </script> <div class="picture">
Next Page