jQuery and dropdowns
Hi, I am about to build a advertisement site but have some problems with the category dropdowns. My thought is to have 5 dropdowns on the page, these dropdowns will be generated by the MVC helper like this : <%: Html.DropDownListFor(model => model.CS.C1, Model.CS.Category1List, "-- Välj kategori --")%> This means that a dropdown will be generated with the id CS_C1 adn itll will be filled with the collection in model.CS.C1 (from the service). It will by this be possible to fill the first dropdown
fadeIn() works in all bar IE
I'm using the following to load an HTML snippet to update a content div. $('#content').hide().load(linkName, function(){$(this).fadeIn(1000)}); It works a treat in all browsers bar IE where the div appears after 1sec rather than fading in. Any suggestions?
How can I add a search parameter?
I need help adding a search parameter to a web application I'm currently developing. Right now, my search results are being pulled from Twitter and includes ALL tweets, however I would like for the returned tweets to all contain a certain word. For the sake of example, if anyone could show me how to do this using the word 'dog' I would greatly appreciate it! function string_replace(haystack, find, sub) { return haystack.split(find).join(sub); } String.prototype.parseHashtag = function() {
superfish menu wrap behaves strangely.
using ie - I know - if the menu wraps the sub-items show up below the top level menu items. http://www.vetgateglobal.com/mainh.cfm?vid=64 the issue - there should be an option called "staff"
Problems w/ .replaceWith...Am I using the right method
I'm trying to make a button that changes its text and function each time it is clicked. First it hides and replaces an element, and even brings it back once, but refuses to hide it again. I'd it to do it ad infinitum. Any help or resource on this would be beyond appreciated. Thanks! <button id="hide">Hide </button> <script> $("#hide").click(function () { $("canvas").hide("slow"); $("#hide").replaceWith('<button id="display">Show'); $("#display").click(function () { $("canvas").show("slow"); $("#display").replaceWith('<button
Traverse frameset frame
Yes, frames are lame but that's what I'm stuck with. I've been unable to get a handle on children/contents of a frame. I can query the attributes of the frame, but traversal functions contents(), children(), find() return nothing. I do get something back with this: target = jQuery("frame"); target[0].contentDocument but how to jQuerify contentDocument?
Manipulate HTML Content
Hello, how can I make <td>yes</td>to this <td><img src="yes"/></td>with jQuery. I must search. I had to look after but yes, and then replace it with other content? But how can I do that?
catalogue/book plugin
Does anyone know if there is a plugin to make a catalogue like talbots or amazon for reading a few pages of their books. Purpose: have a book, that we want ppl to be able to preview online, a few pages of it. sample: http://www.talbots.com/online/ecatalog/catalog.jsp?sku=027OctBook&catheader= http://www.amazon.com/gp/product/1400052173/ref=s9_al_bw_ir01?pf_rd_m=ATVPDKIKX0DER&pf_rd_s=center-3&pf_rd_r=1GJWJND91A62BK4EX7RZ&pf_rd_t=101&pf_rd_p=1269237022&pf_rd_i=283155#reader_1400052173 Thanks ever so
Help with drag and drop.
Hello! I am trying to make a game-like inventory. I found a little help on the web but it didn't get me very far. Here's a demo of what I am doing: Demo: http://street-kings-online.com/temp/demo.php Source:http://street-kings-online.com/temp/dndinv.zip Did you take a look? My first problem is that items don't swap places, but the old item always goes back to the #inventory div. I read a few posts about swapping but I can't get it to work. When swapping works, I'll remove the big #inventory div
Trying to delete the currently focused input's tr
I have a form inside a table and i want to be able to delete a detail row from the form. The user should click on the text field and click on the 'delete detail record' button on the toolbar and delete the whole row. The delete button has a class 'deleteRow', the table has a class 'tableAddRow'. Here's my code so far and its not working: var focus; $("input[type='text']").live('focus', function () { focus = $(this); }); $(".deleteRow").click(function() { $("input[type='text']").each(function(event){
trouble excluding child
Hi, I'm doing a slidetoggle button on a p tag, but inside that p tag contains an a tag, I tried to exclude it by using the :not function, but it won't work. did I do something wrong in the html or css, or am I just wrong? <style> .alignright { float: right; } </style> <p class="ui-accordion-header ui-helper-reset ui-state-default ui-corner-top" style="font-weight:bold; color:#090;"> <span class="alignright">Plate#: dsa-231</span> Net Premium: Blah Blah Blah <a href="<?php echo base_url();?>index.php/memboards/vdetails/<?php
jQuery ajax post gives 12031 error and 501 error
Hi All, We are using jQuery(1.2.3 through ExtJS 2.1 adapter) ajax post and we are getting 12031 error message sporadically. What could be the reason of this error? Sample code jQuery.post('${pageContext.request.contextPath}/sample/someAction.do', jQuery("#form_name").serialize(), function(status){ //Some other code for checking the status...... } Form has two textarea(one disabled, one enabled) and a check box. And a submit button. And there is one ajax error handling function which is for
Issue with .serialize() in IE8 (IE7 Compatibility mode)
I am using IE8 and when I serialize all the checkboxes in my form ( $("#myform input:checkbox").serialize() ), I get the correct results. When I perform the same function in IE8 Compatibility mode (IE7), the last checkbox is truncated. IE8 Result 0=on&1=on&2=on&3=on&4=on&5=on&6=on&7=on&8=on&9=on&10=on&11=on&12=on&13=on&14=on &15=on&16=on&17=on&18=on&19=on&20=on&21=on&22=on&23=on IE8 Compatiblity Mode (IE7) Result 0=on&1=on&2=on&3=on&4=on&5=on&6=on&7=on&8=on&9=on&10=on&11=on&12=on&13=on&14=on &15=on&16=on&17=on&18=on&19=on&20=on&21=on&22=on
$.getJSON() error - InvalidLabel
Hi This is my jsp file. testjson.jsp <%@ page contentType='text/javascript'%> <% response.setContentType("application/x-javascript"); %> {"foo": "The quick brown fox jumps over the lazy dog.", "bar": "ABCDEFG", "baz": [52, 97]} And this is my html file. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type='text/javascript'></script> <script type='text/javascript'> $(document).ready(function(){ $.getJSON('http://localhost:8080/testjson.jsp?callback=?',
How to trigger a function on resize
I found the following script here: http://css-tricks.com/resolution-specific-stylesheets/ It's a script to change a stylesheet based on the browser width. My problem is that when you resize the browser window, the stylesheet doesn't change. It works if you reload, but not on resize. I'm using the script as part of a Wordpress theme. jQuery(document).ready(function($){ $(function() { adjustStyle($(this).width()); $(window).resize(function() { adjustStyle($(this).width());
bug on jQuery.clone(true) ?
Hi, just try to execute this simple code : Array.prototype.test=function(){alert('test')}; var elt=jQuery('<div>').click(jQuery.noop).clone(true); elt.click(); When you trigger the 'click' event on the cloned element, the 'test' method is executed ! testing in jsbin : http://jsbin.com/urite/2 It seems that any method that has been added to the 'Array' object (before cloning, of course) will be executed when any event is triggered. This is not the case if you bind the event after cloning : Array.prototype.test=function(){alert('test')};
Need Help setting up "Show More Results"
Hey, I'm currently building a web application based off posted Tweets. As of now, I'm able to pull the first 25 tweets that contain a searched keyword, however I would like the option to 'Show More Results' at the bottom of the page, so users can view more results if they would like. I've found a tutorial, but am still confused as to how to accomplish this. Any help would be greatly appreciated! Thanks!
trying to find my click.
Hi All, I am working with jquery for the first time to set some fun into my site manager. I have used fancybox to create these nice closable setions on my page. But now I want to try and send an ajax call when a section is opened. So I can remember if it was open before I submit the page with changes. Currently the code to read a click to open or close a section is: $("h2.trigger").click(function(){ $(this).toggleClass("active").next().slideToggle("slow"); } I am asumming that "this"
selector on child
hello, i can't find the good selector for my problem: I've: <div class="edit"> <span class="editable>/<span> <div class="edit-input" style="display:none;"></div> <div class="edit-input" style="display:none;"></div> </div> when i do : $(".edit").click(function() { var di = $(this).siblings('.edit-input'); di.fadeIn(); } there is no problem, all the "edit input" display. but if i have a list of "edit input" like : <div class="edit"> <span class="editable>/<span>
Toggle based on Default Form Values
Hello, I am having a problem here.. I have a form that gets automatically filled based on the values returned by my php file. Then the form elements have their values filled. Now the problem is, I have set few additional show and hide <div> tags based on the values of some other fields. So when the form loads, the <div> tag doesnt show up and stays hidden only as the event that activates it is based on the radio button's change event function. So my question is, as the form loads, how can I have
Caching JQuery Selectors inside JS object
Hey, I have a complex JS object. It manipulates the page DOM. Inside it I have many repetitive selections spread across functions. I would like to cache the selectors to enhance performance. How do other people do this? I can cache on the function level but not the object. When I try to cache on the object level I seemingly end up with stale selectors that while defined don't actually work. My gut is that I can only cache on the function level? Sorry if this has been asked before what I have
Creating a loop
I am looking to create a slide show of sorts. Basically when the document loads I want it to cycle through a series of div's. I already have a var - var backGrounds = $('.vendors, .cinematography, .production, .talent, .about '); I next want it to take a simple animate section (such as this from the documentation) - $('.production').hide().css({"opacity":"0.8"}) .slideDown('slow').delay(2000) .fadeOut(); ;And have it it cycle through my variable backGrounds. Can someone help point me in the
Extreme memory leaks in IE7 and Firefox 3.5.2 when using replaceWith() in jquery 1.4.2
Hi, I'm seeing some huge memory leaks mainly in IE, where the code below adds 6 MB to the IE process every time it refreshes (if I set the timer to refresh every 30 seconds in a few hours I see IE using 1.5 GB of ram). Firefox also exhibits the same problem, although not as badly as IE. What is it that I'm doing wrong? I commented out the replaceWith part and the memory leaks stop, so I'm confident that's the line that bumps up the memory usage. The data that comes back from the server is only 42
.load() doesn't render my PHP
I am loading a list of answers give by a specific user into a tab panel. To do this I'm using the following code: $('#questionBody').load('dashboard/questions');All the html elements not from a loop such as a header image show up fine but the list of answers looks like it's displayed similar to when you use print_r() on an array. Is load() the proper function to use here? here's an example of the output: {"status":200,"data":{"questions":[],"params":{"page":false},"user_answers":{"13":{"flagged":"0","regdate":"1282869034","id":"13","qid":"9","body":"an
predection of animation results required
Hi. I am working on a free web component, http://mediabeez.ws/lah, which often resizes itself according to the amount of content currently in view. This works by calling .show(animDuration) and .hide(animDuration) on several of the <div>s it contains. However, the root-parent <div> also needs to resize according to how much content is currently viewed in the component. With jQuery, one can (imo) only do this if one calls the component's resizeWindow() function like so: component.showHideItem : function
effect doesn't run in firefox
Hi everybody, i'm doing, like usual, an amazing job of outstanding webdesign , suddenly i told my self.. let's try this piece of art in Firefox.. doh!! doesn't work!!! ( in safari and chrome it's ok... i don't have it, but i bet that in IE doesn't work too! ) I've made some tabs that are addressed to show some content when clicked; here is the script i've made: $(document).ready(function () { $('#zona1 .sez.active').fadeIn(0); $('#schede li span.centro').click(function(){ var sezione = $(this).attr('id')
Relocate status element
I am trying to integrate the following file upload plugin http://valums.com/ajax-upload/ It creates a file status update directly below the file upload button, but I wish the update bar to be located elsewhere. The plugin's JavaScript is a little too complex for me to change directly where the status update is displayed. The plugin does have an onSubmit method, and my plan is to just relocate the status update. The plugin shows the status update in a UL with class=qq-upload-list. I added a empty
append(), appendTo() and script evaluation
Hello, I'm retrieving content using Ajax and then I insert it inside the DOM. But there is one very strange thing: If I add the new nodes with append(), the script nodes are executed. If I add the new nodes with appendTo(), the script nodes are NOT executed. Is it an intended behaviour or is it a bug? It's doesn't look documented. Thanks for your anwsers, Sincerely, Savageman.
Input box Jquery and IE problem , text boxes act crazi when using jquery in IE
hi , i have a problem with JQuery and Input[Type=text] in IE6 u can see the problem in the picture see the Red Boxes , there is Text in English and in number but after using JQuery for selecting input or showing a modal windows , input boxes act like it . note : the language you see in the image is persian thanks for your help .
getting value of selected/clicking li element.
Hi!.i try to make thing like this: My list is like below: <ul id="cssdropdown"> <li class="headlink"> Search Engines <ul> <li>Home</li> <li>Downloads</li> <li>Live Search</li> </ul> </li> </ul> what i want is, when i click the <li>(home,downloads..),i will take its value and i write the value instead of "Search engine". How can i make this? Thanks...
jquery selectors??
$("body").not("#cart_special").click(function() { alert('hello'); }); cant seem to get this to work. when i click in the div#cart_special i still get an alert to pop up. What i want is an alert to pop up when the users click anywhere on the screen but the div#cart_special. ( the div#cart_special is a jquery dialog).
problem about binding third party's plugin to element which created dynamically
I used one jquery plugin for image slider show (http://leandrovieira.com/projects/jquery/lightbox). This plugin can be used as : $('#gallery a').lightBox(). all I need is providing the jquery selector for some image link. But the problem is those image elements was inserted into DOM dynamically by ajax processing. If I reference it directly by "('#gallery a')", I get nothing. I know jquery has one method called "delegate" can be bind event handler to dynamically created elements. but seems "delegate"
submit() does not always trigger the live or bound handler
I have this boiled down to the following code: http://gist.github.com/597180 I have two text inputs in a form, and a keydown handler to catch the arrow keys. When the focus is lost on an input, it is supposed to call the submit handler on the form. When I use the tab key, it works as expected, and calls my submit handler. However, when I use the arrow keys, it submits the form and goes to the action url, not running the alert in my custom submit handler. It's as if it either loses the bound submit
selector with variable
Is it possible to use a variable in a selector? So instead of this: $("#slider img").hide(); I want something like this var wrapper = "#slider"; $(wrapper + " img").hide(); But this is just giving me this error: uncaught exception: Syntax error, unrecognized expression: [object Object] I hope somebody can help me with this.
Using jquery, ICEFaces and JBoss for fetching data from the DB
Hello all, All, new to jquery here. Currently have the following with regards to environments: ICEFaces/JBoss/Oracle/NetBeans With this combination, I get the feeling that one would be able to persist data to the database immediately. For example, if one were to run a query that fetched 50,000 rows, then I thought the ICEFaces/JBoss/Oracle/NetBeans approach would be better because it would allow one to move through the result set from the database (in real time) using the arrows to go forward
Assistance with HTML structure building with JQ
Hey all. I have been finding tutorials all over the place and have managed to get this far without needing very specific help. So, I feel rather proud :) Anyways, here is my code base thus far: $.getJSON("search.php?jsoncallback=?", function(data) { //loop through all items in the JSON array for (var x = 0; x < data.length; x++) { //create a container for each comment var div = $("<div>").addClass("entry round").appendTo("#characters");
wide-browser-window <table> layout problem; unwanted whitespace.
Hi. I'm working on a free web component, http://mediabeez.ws/lah, and i've run into a problem. The tables used for displaying items ("body : .../index.php - 2 notices ...") don't display correctly on wide browser windows. When the browser uses a wide window, it shows extra whitespace next to the first <td>, which it's not supposed to. If you put your browser to > 1500 in width, you'll see the bug clearly. It happens in all browsers (although IE doesnt work yet). Help will be much appreciated.
Radio button lists
I have a form with 40 radio button lists. Each radio button list contains 2 radio buttons = "OK" and "NA". The radio button lists are given ID's like "page1RB1", "page1RB2" etc. The radio button lists are assigned a class "rbOK" I am trying to reset all of the radio buttons to "OK" using the following code: function clearChecklist(){ $('.rbOK').each(function(intIndex){ var theText = "#" + $(this).attr('id'); var theDL = theText.replace('RB', 'DL');
Displaying text by selecting checkbox (or two)
I have different text options for various combinations of checkboxes and i am wondering if there a way to display text by selecting checkbox (sometimes multiple checkboxes) using jQuery?
Jquery background swap and joomla?
Hi just writing a what should be simple swap. Heres the idea. var dark = " 'url(<?php echo $this->baseurl ?>/templates/JordanTemplate/Images/Layout/inputBGdark.png)' "; $('#message').focus(function() { if($(this).val()=="Message"){ $(this).val(""); } $(this).css({ 'color': '#ffffff' }); $(this).css('background',dark); }); Wondering why this won't work? THanks
Next Page