debugging minified code
Hi, I came across an issue that took me quite a while to fix. One of the main problem was debugging code that is minified or stepping through minified code to be more precise. What's the best way to deal with this? In my particular case I had to step through jquery ui code and what I did in the end is actually edit the minified code to separate specific parts of the code into separate lines so it was easy to step through it. not a nice task! There is a development bundle but the files are separate
[jQuery] How can I find out if a <style> class exists?
I'm working on something that I want a user to be able to override by including a specific class somewhere in the CSS definitions. If that class doesn't exist I want to add a default style. This seems like something that should have come up before but search isn't coming up with anything. Can someone point me in the right direction? Local styles/classes override global classes right? IOW given the following: <style> #myDiv {background: blue;} </style> <div id="myDiv" style="background: red">
Check hover's selectors from css style
Hi people, I'm having a question with selectors from css style. I would like to verify if a css class has an hover selector. follows the example: .class{ background-color:#999; } .class:hover{ background-color:#888; } if (.class has 'hover selector') then do it My purpose is manipulate hover effects directly from css styles, effects like fade with a simple addition of a hover's selector into the css styles.
Select all <label> tags of checked checkboxes
Look at my 'fiddle' http://jsfiddle.net/9uhRX/ I need to remove the checkbox and label when a checkbox is selected. For example: I check the checkbox "flashlight". --> The checkbox and the text "flashlight" slowly fade away. Can anyone help? Thanks a million! Eric
Selecting elements from HTML string
how can i select elements from a HTML string. i have used .get() to load data and i want to search for HTML elements within that data/string $.get(nextHref, function(data) { alert(data); // OK // i tried alert($(data).find("#posts").html()); // returns null // and alert($("#posts", data).html()); // returns null also }
iGoogle User Interface Local Storage
Hi, I'm implementing an iGoogle user interface feature which can allow the users drag/drop, move around the widgets, and collapse/expand the widgets. I got solution for the UI change part, but just wondering how I can save the UI positions, widgets changes to users' local machine. Is there any jquery plugin, functions I can use? Thanks!
Create form elements dynamically from AJAX
Hello everyone, this is my first post on this forum and I hope you can help... I have a project at work which is to use data taken from one web-page and to dynamically create inputboxes and labels based on this data in another webpage. I am able to take this data and add it to a div container: var ProductName = ($(data).find('#Name' + id.toString()).text()); var ProductPrice = ($(data).find('#Price' + id.toString()).text()); var ProductTotal = ($(data).find('#Total' + id.toString()).text());
AJAX Live Search with jQuery
Does jQuery has the ajax search ability? I mean if I press any key in a textfield in real-time it searches database and shows all entries matches that entered value, for example if I enter "ad", and database has both "admin" and "adela" it shows both in a list and allows you to select one, something log the search ability on wikipedia. Is it possible with jQuery? If yes, can you give me a direct link to the tutorial to do this?
Ajax cache character
Hi jQuery gurus, Can the character used for preventing browser caching be changed from '_' to '#' ? More info: If I set AJAX cache to false using: $.ajaxSetup ({ cache: false });Then my resulting AJAX URL has the characters &_=1278682998056 added to the end so that the browser (especially IE) sees it as a new page request. All well and good so far. The resulting call is: eg http://MyServer.myfunction?p_param1=5000405&_=1278682998056 My HTML page is using AJAX to call an Oracle function directly
AJAX functionality works without deploying in an HTTP server?
I use AJAX functionality in my project & my coding something similar to the following: $('.home').click(function(event){ event.preventDefault(); $.ajax({ url: 'home.html', success: function(data){ jQuery('.contents').html(data); } }); })Initially I (successfully) tested my project after deploying to the Apache
Linked sliders with maximum shared value
Hi all, Kinda new to jQuery so go easy on me! I need a solution to have multiple linked sliders that all share a maximum value, for example, I would have 10 sliders, each set to 50, with a pool of 10 additional points to spend. If I assign all 10 points to 1 slider, the other 9 are locked out, or I could spend 1 point on each slider. Any ideas? Thanks
image gallery not working in IE
Hi guys, Just wondering if you can help me out with this problem, i'm trying to use a jquery slider which i downloaded from one of jquery sites.. Slider works fine in all browsers except I.E.. The problem only occurs once a integrate javascript codes with php.. See codes below: //my codes <?php echo<<<EOD <script type='text/javascript'> if(!window.slider) var slider={}; slider.data=[ EOD; $query = "select id, item_name, description from items where brand_id='$_GET[id]'"; $result
jQuery event object removes rangeParent & rangeOffset under Firefox
Firefox adds two very useful properties to its native event object: on mouse events: rangeParent & rangeOffset. However, when I use jQuery to bind my handlers (under Firefox), these two properties are not present on the jQuery event object. How can I access these Firefox specific properties? Get a reference to the native Firefox event object? $(selector).mousedown(function (event) { . .... // How can I access rangeParent & rangeOffset from this context in Firefox? }); Thanks for your help
ajax and returned value after onclick button
Hi, I have a form to validate before submiting the values. I need to make some validation on client side and another control on the server. My code looks like: <input type="btnSubmit" value="Submit" onclick="return SubmitData();" /> function SubmitData(){ //do some control on client side .... //Call server method for getting some info $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", dataType: "json",
CSS Color property
I am trying to access the 'color' property of a field and I get the result in terms of rgb in case of Firefox and Chrome and IE returns the hex value. Is there a standard way to do this so that I do not need to do the browser check? if ($('#Address').css('color') == '#aaa') { alert('Executes in IE'); } else if ($('#Address').css('color') == 'rgb(170, 170, 170)') { alert('Executes in FF and Chrome'); }
Jquery Modal Box Help Needed
I have a project that I need to create a modal for. It activates when a link is clicked. For links that link to pages within the folder it doesn't pop up. But, if it goes outside of that folder (either at the same domain or to another domain) it is supposed to come up and alert the user that they are leaving that area. So far I have to modal coming up, but the mask doesn't appear. Also, I'm having trouble figuring out what to do for the URL situation. This is the plan given to me for the links: doc.ready
How to get div content height
I have div that's 200px high the code below loads the content into div: $(function() { $("div#t_and_c_div").load("https://localhost/pages/t_and_c.html"); });I want to get the height of the entire document loaded into div, but when I use $("div#t_and_c_div").height() it returns 200 (height of the div). Any help is greatly appreciated.
Not able to fadeout ActiveX Control
Hello All, I facing a strange problem. I have developed a active-X control to play video on the top of VLC player in C# . It contains a windows panel in which video is displayed . Its is placed in a DIV tag , like this : <div id="AxControl"> <object id="Ax_Test" classid="CLSID:A47C22B1-3CC3-45bc-801E-3FCC4FFD3E45" height="270" width="300" border="1"></object> </div> </td> Now when I try to fadeout my DIV like this : $(document).ready(function () { $('#AxControl').fadeOut(5000, function
Regular Expression to find Html tags is not working properly in Chrome
Hello, I Use the regular expression to find the html tags present in the input box, It works properly in IE & FF but in chrome it works fine when use first time for an input box but not again, below my code... function IsWithinTags(inputString) { var regExp = /<\/?[^>]+(>|$)/g; inputString = inputString.replace(/&(lt|gt);/g, function (strMatch, p1) { return (p1 == "lt") ? "<" : ">"; }); return (regExp.test(inputString)); } Give
Problem with a plugin pattern
Hy Why do I dont't get the alerts? (function($){ $.myClassName = { calcSomething: function(obj){ //do something alert('do something'); }, main: function(){ alert('start'); return this.each(function(){ // I don't get this alert alert('insite'); }); // I don't get this alert alert('end') ; } } $.fn.myMethod = $.myClassName.main; $(".myclass").myMethod();
jQuery slide function is jittery, not smooth, popping
I have read about a zillion forum posts on this issue and still no joy. I am using some pretty simple code: $(function () { $('div.content div').slideUp(0); $('div.content p').click(function () { $(this).next().slideToggle(500); }); }); Here is an example where you can see it. http://islandnet.com/~ric0/seattlesalsacongress.com/faq1.html I have tried zeroing out padding margin etc but no luck.
Export to Excel using jQuery
Hello all, I've a HTML table on my JSP page, that I want to export to excel on a button click. How can I do this using jQuery ? Any code examples to demo. this would be great Thanks, Pritish.
solari board
hi , does anyone know how to create a solari board animation using jquery?
Slide Dock Jquey deactivating all links on website
Hi i am implementing a slide dock in jquery i.e. there is a tab and when you click it a dock comes out (used for a shopping cart to display the shopping cart) it is working fine the only problem. Once the transition is complete and the shopping cart is closed and returns back to position all the links on the website are deactivated and no matter where i click it wont take me anywhere. Any ideas? This is the code for the jquery of the pageslide: (function($){ $.fn.pageSlide = function(options)
Add content from xml
Hi, My first post. Trying to get data from xml file. Got it. Trying add data in class - need help $(this).find('Category').each(function(){ var menuItem = ($(this).find('Label:first').text()) $(".DfMenu").text(menuItem) alert(menuItem) problem -there are 4 menu item. alert shows up right but it add same data in all menus one by one. Question - how can I add four different menu item in four divs that is using the same class. Thank you
Get checked or unchecked Check box value from group.
Hi I am extensively started using jQuery in my project.But I got stopped where I need to get either checked or unchecked checkbox values from group of check boxes. <input type="checkbox" name="attribute" id="attribute" > ONE <input type="checkbox" name="attribute" id="attribute" > TWO <input type="checkbox" name="attribute" id="attribute" > THREE <input type="checkbox" name="attribute" id="attribute" > FOUR from above group checkboxes you can select one or more.This can be done any time. What I
Remove an occurrence of a character from a string
Hello, I'm trying to remove one of the $ signs from this string below. I've gotten as far as removing them both. I'm having trouble removing one of them. Can someone help? <!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> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
jQuery navigation with hashchange problem
Hi, I have a problem with the navigation on my site. I want my primary navigation to load content without the browser refreshing and it's working out alright except for the fact that my secondary navigation won't work at all. I'm going to put the code first, so I can use references: $(document).ready(function() { var newHash = ""; // PRIMARY NAVIGATION $("#main>nav a").click( function() { window.location.hash = $(this).attr("href"); return false;
jQuery validation not working after coming back from Thickbox display
Hi, I am using Thickbox 3.1, jquery-1.3.2.min.js and jquery.validate.js. I have a form that on click presents a preview page, which is a thickbox tb_show. when i close a thick box and edit the fields, validation messages are appearing properly. But my cursor is not coming out of validator() method in the below code. I am adding the code snippet below: Any help or suggestion is appreciated. Thanks in advance. Regards: Qayyum <form class="standard" action="<%=formAction%>" method="post" name="registerCard"
animate ajax returned data
$.ajax({ type: "POST", url: "addevent.php", data: userdata, cache: false, success: function(data) { $("div#my_events").prepend(data); }so I'm loading the div#my_events by prepend(data) where "data" is another well styled div. Is there anyway to animate this returned data. Unfortunately I can't just specify a unique ID on the incoming data. So I was wondering how else I might be able to address this data I'm returning. It is basically a topic list, with
load html in DIV from dynamic feed or script
Hi I am trying to collate or the email newsletter I have created into one place on my site. I have borrowed so code that looked like it should work but it keeps jumping to another page. example my code <script src="http://code.jquery.com/jquery-latest.pack.js"></script> <style type="text/css"> <!-- a:link { text-decoration: none; color: #06F; } a:visited { text-decoration: none; color: #666; } a:active { text-decoration: none; color: #666; } a:hover { text-decoration: none; color: #000; } #container
load external page with inline javascripts
Hi, I am trying to access an external page (.aspx) and change it's styles and some event functionalities using ajax/jquery. But it doesn't load the javascript inside the asp script. How can I load the embedded script as well with jquery 'load' ? Has anybody experienced this kind of isue? Please share your experience and help me please.... Thanks, J
Selecting regions on a map using images to define the selectable area
Hi, I've been developing an interactive map for a charity and at the moment I have small markers on each region that popup information when mouseover'd. I'd like to make the regions themselves activate the code but the complexity of each area (and that I would like to highlight the area when mouseover'd) prohibits using the 'shape=poly' method. Does anyone know of a way to provide images to define the area? i was thinking a black and white gif as the filesizes would be very small. Thanks for any
only call one event method
hi, I have a problem with jquery and events. if a html file where i some structured divs like: <div id="foo"> test <div id="bar"> test2</div> </div> i have 2 jquery function for every div. but if i click the div with the id bar. both functions gets called. Is there any way to block the first event? regards, patrick
problem post ajax with data
Hi I'm trying to do a ajax post with data like this $.ajax({ type: "POST", url: url, data: var_send, success: function(data){ p_html(data); } }); in the var var_send the value is {"mod":"new", "RELATGPEVT_RELATCOD","2"} and when i do the ajax they do a GET (id o with POST) but never calling the success, they occur when i use the "data" in ajax, when it's empty they work's fine I try to use the traditional:true and the processData:
On mouseover text to show corresponding image?
Whilst I have gain more confidence over time using jQuery, I wish for some help with something I wish to create. I wish to show a div image area and below it, just simple text. I want to however, when onmouseover the text, a corresponding image appears in the div. So for example, the text might be "Book", the image will show a book or "PC", it will show an image of a PC. How might I be able to do this?
Calling webservice working in IE but not in FF
Hi, Can anyone tell me why the following code results in an error in Firefox&Chrome and success in Internet Explorer? var serviceUrl = 'http://localhost:1983/Service1.asmx/GetUserProfile'; var inputjsonData = JSON.stringify({ 'parameters': '<UserDetails><UserID>' + userId +'</UserID></UserDetails>' }); $.ajax({ type: "POST", url: serviceUrl, data: inputjsonData, contentType: "application/json; charset=utf-8", dataType: "json", success:
Unbind not working
Hi, I have a treeview style control, loaded inside a jqueryui dialog. when the control is initialised, I bind the click event to any li element (for expanding collapsed). $("li", this.element).live("click", toggleNode); however, when the dialog is repeatedly closed and reopened, the events seem to duplicate and triplicate. I set function to try and unbind the click event, but it doesnt seem to have any effect. $("li").unbind("click"); This is called when the dialog box is closed. However, I still
create an unordered list dynamically and turn it into tabs
I'm trying to create an unordered list dynamically and then turn it into jQuery UI tabs... I think I'm having problem with syntax here, I managed to create the list and turn it into the widget, but those tabs don't look right, they have the outline of the widget but the content doesn't have actual tabs, so my guess is it only 'kind of worked' $("#doc3").append("<ul>"); $("#doc3").append("<li><a href='#thisGame'>asass<a></li>"); $("#doc3").append("<li><a href='#thisGame2'>asass<a></li>"); $("#doc3").append("</ul>");
treeview help required
Hi All I have a treeview.js and I wrote json code for items n subitems in .aspx page javascript. I need to write code for multiselecting treeview nodes after that if i click on a button the selected nodes should be copied or moved to another component(probably another div). below r the treeview.js and javascript code i used I also need a treeview.js which is suitable for this task to work.Please provide a link for latest version of treeview.js treeview.js treeview = function(tData, container) {
Next Page