Search Results

Search found 23364 results on 935 pages for 'jquery ui droppable'.

Page 167/935 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • XML parsing using jQuery

    - by lmkk
    I have the following xml: <?xml version="1.0" encoding="utf-8"?> <Area xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Scenes> <Scene Index="1" Name="Scene1" /> <Scene Index="2" Name="Scene2" /> </Scenes> </Area> Which i am trying to parse with jquery: <script> $(document).ready(function(){ $.ajax({ type: "GET", url: "list.xml", dataType: "xml", success: function(xml) { $(xml).find('scenes').each(function(){ $(this).find('scene').each(function(){ var name = $(this).attr('name'); $('<div class="items" ></div>').html('<p>'+name+'</p>').appendTo('#page-wrap'); }); }); } }); }); </script> Why is this not working? Help!! first attempt at javascript/jquery This is based on a example I found, but have so far been unable to adapt it to my usage. / Lars

    Read the article

  • Jquery and PHP function

    - by Sergio
    How can I this PHP function include in jquery .html? PHP function: function trim_text($string, $limit, $break="<", $pad=" ...") { $words = explode(' ', htmlentities(strip_tags($string))); $countr = count($words); if ($countr <= 8) { return $string; }else{ // return with no change if string is shorter than $limit if(strlen($string) <= $limit) return $string; $string = substr($string, 0, $limit); if(false !== ($breakpoint = strpos($string, $break, $limit))) { if($breakpoint < strlen($string) - 1) { $string = substr($string, 0, $breakpoint) . $pad; } } $last_space = strrpos(substr($string, 0, $limit), ' '); $string = substr($string, 0, $last_space); $string = strip_tags($string); return $string.$pad; } } And the Jquery part of code where I want to in ".html" part somehow call this function is: $(" .text").html('<div>'+ message +'</div>'); What I want to do is trim this "message" text using PHP function. Is it possible?

    Read the article

  • jQuery: list appended not displaying bullets

    - by Shizhidi
    I have the following html: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <span>not so important</span> <span title="some specific text"><img src="/img/some.gif" /></span> <span title="more specific text">important 1</span> <span title="more specific text">important 2</span> <span title="more specific text">important 3</span> <span title="more specific text"><img src="/img/some.gif" /></span> <ul> <li>example 1</li> <li>example 2</li> <li>example 3</li> <ul> <script> var ul = $('body').append($('<ul>')); $("span[title*='specific text']") .contents() .filter(function(){ return $(this).nodeType != 1; }) .each(function(){ ul.append($('<li>' + $(this).text() + '</li>')); }) </script> </body> </html> I want to retrieve the text within a 'span' whose title attribute contains "specific text", in this case "important 1", "important 2" and "important 3". Then I want to list them below just like the example. However the bullets do not appear, why is that? Any hints would be appreciated!

    Read the article

  • jquery pagination plugin problem

    - by John the horn
    I am using a pagination plugin called "pagination". Here is the script that is initialized : function pageselectCallback(page_index, jq){ var new_content = jQuery('#hiddenresult div.result:eq('+page_index+')').clone(); $('#Searchresult').empty().append(new_content); return false; } /** * Initialisation function for pagination */ function initPagination() { // count entries inside the hidden content var num_entries = jQuery('#hiddenresult div.result').length; // Create content inside pagination element $("#Pagination").pagination(num_entries, { callback: pageselectCallback, items_per_page:1 // Show only one item per page }); } // When document is ready, initialize pagination $(document).ready(function(){ initPagination(); }); and I am using this script for accordation on the page : <script type="text/javascript"> $(document).ready(function(){ $('#content').show(); $('#content1').hide(); $('#content2').hide(); $('#content3').hide(); $('#content4').hide(); $('#content5').hide(); $('a.bucatarii_serie').click(function(){ $("div[id^='content']").hide(); $('#content').toggle('slow'); }); $('a.livinguri_serie').click(function(){ $("div[id^='content']").hide(); $('#content1').toggle('slow'); }); $('a.dormitoare_serie').click(function(){ $("div[id^='content']").hide(); $('#content2').toggle('slow'); }); $('a.tratamente').click(function(){ $("div[id^='content']").hide(); $('#content3').toggle('slow'); }); $('a.chirurgie').click(function(){ $("div[id^='content']").hide(); $('#content4').toggle('slow'); }); $('a.frizerie').click(function(){ $("div[id^='content']").hide(); $('#content5').toggle('slow'); }); }); </script> My problem is that I don't know how to implement multiple paginations on the same page in diferent containers but in a bigger container.

    Read the article

  • building jquery checkbox - can't set checked value

    - by benpage
    this seems straightforward enough, I don't know if it's a bug, or just something I'm doing wrong. What I want to do is build a checkbox input in jquery, then return the string of the input. I have this code: var obj = $('<input>'); obj.attr('disabled', 'disabled'); obj.attr('type', 'checkbox'); obj.attr('checked', 'checked'); // this does not work! no matter how i try to render this obj, the 'checked' attribute never gets outputted. So I have tried: $('<div>').append(obj).remove().html(); and it returns: <input type="checkbox" disabled="disabled" /> I have tried setting an id attribute, it makes no difference. I have also tried this but it doesn't work: obj.attr('checked', true); Any suggestions on how to get the input tag rendered with the checked attribute set to 'checked' (via jquery)? I realise I can just do this with string concatenation, but now I really want to know why it's not working the way it should.

    Read the article

  • How to get DIVs into this code via JQuery

    - by ludz
    Heya everyone I been struggling along with this piece of code for the longest time, its driving me insane. I am trying many different things and looking at past posts here but nothing seems to be helping. Basicly i have a jquery pagination code in place and i want to add animated transitions between pages. With some assistance i got that working correctly however this causes the page to jump around as the new items fade in and out. To fix this i need a DIV wrapped around each selection of results. I have been trying to use .wrap .html .wrapinner .append and i cant get any of it to work properly. The 2 areas where i beleive the code needs to be place are as follows: $('#content').children().slice(0, show_per_page).css('display', 'block'); and $('#content').children().fadeOut('slow').slice(start_from, end_on).fadeIn('slow'); Full original code: http://tutsvalley.com/tutorials/making-a-jquery-pagination-system/ Only the second line of code posted here has been altered. Basicly i want to wrap each group of sliced output in a DIV. I hope that makes sense, if you need anymore information please let me know. Any ideas or suggestions on what to try it would be much apreciated as its currently driving me crazy :) Ludz~

    Read the article

  • Trying to return data asynchronously using jQuery AND jSon in MVC 2.0

    - by Calibre2010
    Hi, I am trying to use Jquerys getJSON method to return data server side to my browser, what happens is the url the getJSON method points to does get reached but upon the postback the result does not get returned to the browser for some odd reason. I wasen't sure if it was because I was using MVC 2.0 and jQuery 1.4.1 and it differs to the MVC 1.0 version and jQuerys 1.3.2 version. . this is the code sections Controller public JsonResult StringReturn() { NameDTO myName = new NameDTO(); myName.nameID = 1; myName.name= "James"; myName.nameDescription = "Jmaes"; return Json(myName); } View with JQuery <script type="text/javascript"> $(document).ready(function () { $("#myButton").click(function () { $.getJSON("Home/StringReturn/", null, function (data) { alert(data.name); $("#show").append($("<div>" + data.name + "</div>")); }); }); }); </script> HTML <input type="button" value="clickMe" id="myButton"/> <div id="show">d</div>

    Read the article

  • Calling jquery function from ascx not working

    - by Metju
    Hi Guys, I'm having a problem with the following situation. I have an ascx which contains a submit button for a search criteria and I am trying to call a validation function in a js file I've used throughout the site (this is the first time I'm using it in an ascx). Now I've just tried this: <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript" src="js/jsAdmin_Generic_SystemValidation.js"></script> <script type="text/javascript"> $(document).ready(function () { $(".submitBtn").click(function (e) { alert("test"); alert($.Validate()); alert("test 2"); }); }); </script> The file is being referenced correctly as I am already seeing posts in Firebug that are done by it. This is the function: jQuery.extend({ Validate: function () { does validation... }); Now at first I was getting "Validate() is not a function" in firebug. Since I did that alert testing, I am getting the first alert, then nothing with no errors. Can anyone shed some light? Thanks

    Read the article

  • Convert JavaScript to jQuery

    - by bloggerious
    I have the following JavaScript code which I like to convert to jQuery but has no luck. I would like to convert it to jQuery specifically beginning from this: <?php if(Voting_Method == 2){ if (mnmxmlhttp[htmlid].readyState == 4) { xvotesString[htmlid] = mnmxmlhttp[htmlid].responseText; if (xvotesString[htmlid].match (errormatch)) { xvotesString[htmlid] = xvotesString[htmlid].substring (6, xvotesString[htmlid].length); <?php if(Voting_Method == 1){ echo "changemnmvalues (htmlid, value, true);"; }?> } else { <?php if(Voting_Method == 2){ echo "var mySplitResult = xvotesString[htmlid].split('~');\n"; echo "target3 = document.getElementById ('xvote-' + htmlid);\n"; echo "target3.style.width = mySplitResult[0] + 'px';\n"; echo "if (target4 = document.getElementById ('mnma-' + htmlid))"; echo " target4.innerHTML = mySplitResult[1];\n"; echo "if (target5 = document.getElementById ('mnmb-' + htmlid))"; echo " target5.innerHTML = mySplitResult[2];\n"; echo "if (target6 = document.getElementById ('mnmc-' + htmlid))"; echo " target6.style.display='none'; \n"; echo "if (target6 = document.getElementById ('mnmd-' + htmlid))"; echo " target6.style.display='block'; \n"; echo "target7 = document.getElementById ('xvotes-' + htmlid);\n"; echo "target7.className = 'star-rating-noh';\n"; }?> <?php if(Voting_Method == 1){ echo 'if (xvotesString[htmlid].substring (1, 6) == "ERROR") { '; echo "alert(xvotesString[htmlid]); } else {"; echo "changemnmvalues (htmlid, value, false); } "; }?> } Any help is greatly appreciated.

    Read the article

  • Jquery if statement help

    - by mtwallet
    Hi. I want to know how to correctly write an if statement with jquery. I have a bunch of div's with an anchor in each that when clicked expands the the div's width using toggleClass. This works fine but I want to write an if statement that checks to see if the other div's have the same class applied, if so contract that div, then expand the next div (hope that makes sense), my code so far: HTML: <div class="content-block"> <h2>Title</h2> <p>Content...</p> <a class="expand" href="#">Expand View</a> </div> <div class="content-block"> <h2>Title</h2> <p>Content...</p> <a class="expand" href="#">Expand View</a> </div> <div class="content-block"> <h2>Title</h2> <p>Content...</p> <a class="expand" href="#">Expand View</a> </div> <div class="content-block"> <h2>Title</h2> <p>Content...</p> <a class="expand" href="#">Expand View</a> </div> JQUERY: $(document).ready(function(){ $('a.expand').click(function(){ $(this).parent('.content-block').toggleClass('wide'); }); });

    Read the article

  • jQuery slideDown: Parent element doesn't expand?

    - by bobsoap
    Hi, This issue occurs in our beloved Internet Explorer 7: I have a list of items, each with a hidden child div. When user clicks the "expand" button in any list item, the hidden div will expand downwards and push all content beneith it lower. This works just as it should in FF, Chrome, IE8 - but IE7 will not expand the parent element along with its children. This is noticeable because the top-most parent container has an absolutely positioned image at the very bottom (yea... rounded corners) - that doesn't get pushed down when the content expands. I'm guessing that's because of the absolute positioning... Just wondering whether I should attempt to code up some huge workaround in jQuery just for that (assuming I'm able to), or if this is a known issue of some sort. My HTML: <div id="container"> <ul> <li>Click here to expand <div class="hide"></div> </li> <li>Click here to expand <div class="hide"></div> </li> <li>Click here to expand <div class="hide"></div> </li> </ul> <div id="containerbottom"></div> </div> The CSS: #container { position:relative; } #container #containerbottom { position:absolute; bottom:0px; left:0px; } The jQuery is pretty much your everyday slide function: $('ul li').click(function() { $(this).children('.hide').slideDown(200); }); Any ideas?

    Read the article

  • jQuery: hard time to get <embed> element

    - by Patrick
    hi, how can I get the embed element with jQuery ? (I spent enough time trying with "children(), find(), last() jquery functions). This is my code. Until here it works, I would like to get the second children (embed). $('div.filefield-file').each(function(index) { console.log($(this).children()); }); </script> This is HTML code: Scheduling Video <div class="field-item even"> <div class="filefield-file clear-block"><div class="filefield-icon field-icon-video-x-flv"><img class="field-icon-video-x-flv" alt="video/x-flv icon" src="http://localhost/drupal/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/video-x-generic.png"></div><div style="background-color: rgb(255, 255, 255); width: 400px;"><embed style="display: block;" src="/drupal/videoPlayer.swf?file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/screenshot.flv" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" bgcolor="#ffffff" allowfullscreen="true" autoplay="true" flashvars="file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/screenshot.flv" height="400" width="400"><div>screenshot.flv</div></div></div> </div>

    Read the article

  • jQuery Tablesorter - column not sorting alphabetically

    - by McGirl
    I'm not sure what's going wrong here. This is the page: http://www.utexas.edu/ssw/cswr/projects/project-list/ The first column sorts, but it isn't returning data in the correct order (alphabetical). The table itself is being generated by a custom PHP function that pulls info from a WordPress database. I thought that might be the issue, but as you can see the fourth column (End Date) sorts correctly. I also thought it might be the links in the first column that were messing things up, but adding the text-extraction code from this page broke the sorting altogether. This is the jQuery code I'm current using to call Tablesorter: <script type="text/javascript" id="js"> jQuery(document).ready(function($) { $(document).ready(function() { // call the tablesorter plugin, the magic happens in the markup $("#projectTable").tablesorter({ // pass the headers argument and assing a object //debug: true, //sortList: [[0,0]], headers: { 0: { // set the column to sort as text sorter: 'text', }, // assign the secound column (we start counting zero) 1: { // disable it by setting the property sorter to false sorter: false, }, // assign the third column (we start counting zero) 2: { // disable it by setting the property sorter to false sorter: false }, 3: { sorter:'digit' } } }); // Works only with plugin modification $("#projectTable").bind("sortStart",function(e) { if( $(e.target).hasClass('header') ) { $("#overlay").show(); } }).bind("sortEnd",function(e) { if( $(e.target).hasClass('header') ) { $("#overlay").hide(); } }); }); }); </script> Thanks for your help!

    Read the article

  • Jquery addClass on radio box checked.

    - by Zoltan Repas
    I checked all the topics, but i simply don't know why my script does not work :( <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $('#pic').click(function() { $(this).parents("li").find(".green").removeClass("green"); if($(this).is(':checked')) { $(this).parents("ul").find("li").addClass('green'); } }); </script> etc... <ul> <li><input type="radio" name="pic" value="asd"/>asd</li> <li><input type="radio" name="pic" value="b"/>asd</li> <li><input type="radio" name="pic" value="ba"/>asd</li> <li><input type="radio" name="pic" value="bs"/>asd</li> <li><input type="radio" name="pic" value="bc"/>asd</li> </ul> Please help me!

    Read the article

  • Possible defect with jQuery ':checked' selector (finding checked checkbox when there are none)

    - by Mphammad Ashour
    Found a strange thing. The following code is supposed to set a default value for a UI element based on whether one of a group of checkboxes (all having attribute name="privacy") is checked (in say, a form postback). If there is no value in the HTML sent by the server (the form is not a postback), the default value should be firstMenuItemKey. Otherwise, it should be the one checked in the underlying HTML. However, while this works on the first call to the URL that includes the form, a refresh of the page will set the value of defaultPrivacyValue to one of the privacy checkboxes'. I've checked that the server isn't checking the checkbox before the script runs (it's not). I've also checked whether somewhere else in the script is checking the checkbox (it's not). var defaultPrivacyValue = firstMenuItemKey; $('input[name=privacy]:checked').each(function() { defaultPrivacyValue = $(this).next().find('.name').text(); }); selectMenuItem(defaultPrivacyValue); When I chaged the selector to 'input[name=privacy][checked=checked]' it worked as expected. Is this a defect in the jQuery implementation of DOM retrieval based on the ':checked' selector???? I'm using jQuery 1.4.2. Thanks for any help you can give.

    Read the article

  • jQuery $this problems

    - by kylex
    I have the following code: <ul class="cssdropdown"> <li class="headlink">RANGE <ul class="innerDrop"> <li>Range Child</li> <ul> <li> <li class="headlink">HOME <ul class="innerDrop"> <li>Home Child</li> <ul> <li> </ul> I'm trying to toggle the <ul class="innerDrop" with some jQuery. And I need to do it by adding a class the hide class which has display:none It hides fine, but when I click on the HOME or RANGE it opens both inner <li> when I just want the one to open. Here is my jQuery: $(document).ready(function(){ $('li.headlink ul').addClass('hide'); $('#header').append('<div class=\"showpersonal\" onclick=\"toggleMenu()\"></div>'); $('#header').append('<div class=\"showbusiness\" onclick=\"toggleMenu()\"></div>'); }); function toggleMenu() { $('li.headlink ul').toggleClass('hide', this); }

    Read the article

  • jQuery DOM manipulation

    - by ufw
    I have different php output in jQuery-based tabs. This output is formed from database and it consists of several <div>'s. Every time I click any tab it sends AJAX request to the php script which performs "SELECT" request and gives result back as response to AJAX request from the tab. $(document).ready(function() { $('ul.tabs li').css('cursor', 'pointer'); $('ul.tabs.tabs1 li').click(function(){ var thisClass = this.className.slice(0,2); $('div.t1').hide(); $('div.t2').hide(); $('div.t3').hide(); $('div.t4').hide(); $('div.' + thisClass).show('fast'); $('ul.tabs.tabs1 li').removeClass('tab-current'); $(this).addClass('tab-current'); var data = thisClass; $.ajax({ type:"GET", url:"handler.php?name="+data, data:data, success:function(html) { $('div.' + thisClass).html(html); } }); return false; }); }); //Server-side PHP script: <?php $name = $_GET[name]; switch ($name) { case "t1": query_and_output_1(); case "t2": query_and_output_2(); // etc... } ?> The problem is that the first tab contains output that must be in second and third ones as well, the second also contains the third tab output. Sorry for such a rubbishy question, I used to work with server side and unfortunately I'm not familiar with DOM and jQuery yet. Thanks.

    Read the article

  • jQuery crashing Internet Explorer

    - by Bradley Bell
    Hello. Okay basically, I'm designing and developing a fairly complicated website which revolves around the use of jQuery.. My knowlege of jQuery is really poor and this is the first time I've properly used it. I posted a question here before about the script and apparently its awful, but I didn't show you exactly what I was actually writing it for, which I can now.. Because I've uploaded it onto a test directory. It now works fine in every browser other than IE. The CSS styling is getting there and it should be close to finish soon! However, Internet Explorer is showing bad problems.. In IE 7,8 it looks fine but when you go to hover over a link, it immediately crashes. IE 6, the display doesn't seem to be working properly at all. But IE 6 is a lesser problem. If you could take just 5 or 10 minutes to potentially rewrite a simple script which would potentially take me 10 hours, I would be so so grateful! Heres the site - http://openyourheart.org.uk/test/index.html I can send all the files zipped if required. Thankyou in advance. Bradley

    Read the article

  • Jquery Show Fields depending on Select Menu value but on page load

    - by Tim
    Hello, This question refers to the question http://stackoverflow.com/questions/835259/jquery-show-hide-fields-depening-on-select-value <select id="viewSelector"> <option value="0">-- Select a View --</option> <option value="view1">view1</option> <option value="view2">view2</option> <option value="view3">view3</option> </select> <div id="view1"> <!-- content --> </div> <div id="view2a"> <!-- content --> </div> <div id="view2b"> <!-- content --> </div> <div id="view3"> <!-- content --> </div> $(document).ready(function() { $.viewMap = { '0' : $([]), 'view1' : $('#view1'), 'view2' : $('#view2a, #view2b'), 'view3' : $('#view3') }; $('#viewSelector').change(function() { // hide all $.each($.viewMap, function() { this.hide(); }); // show current $.viewMap[$(this).val()].show(); }); }); When I select the 2nd item in the menu it shows the corresponding field. The exception to this is when the on page load the select menu already has the 2nd menu item selected, the field does not show. As you may be able to tell, I am new to jquery and could definetly use some help with adjusting this code so that the selected item's field is shown on page load. Thanks, Tim

    Read the article

  • Selective JQuery validation

    - by TenaciousImpy
    Hi, I'm using JQuery Validation to validate a particular textbox in my form. The textbox is an optional website section, which uses the url validation method. This works fine and validates accordingly. I would like to have http:// preset into the textbox, to save the user having to type it. However, when the text is set, the validator becomes 'active', and prevents anything on the form being submitted until either the http:// is manually removed, or a valid website is entered. Is there a way of preseting text into the textbox, which won't cause the validator to start validating? I tried to use $("[id$='tbWebsite']").val("http://"); just before I call form.validate(), but it doesn't work (i.e. it still gets checked). I've never used JQuery Validator before, so hopefully there's a fix for this that I'm missing! An alternate solution for my case in particular, could be to activate the validator if a certain button is pressed (instead of any button on the form). Would that be possible? Thanks

    Read the article

  • Apply the REL attibute automatically to posts using jQuery

    - by Couto
    Edited: I mean grouping as giving the same REL attibute to all IMGs in the same post, but each post has different REL as the example at the end of this question. So, I need to do the following: <div id="Blog1" class="widget Blog"> <div class="blog-posts hfeed"> <div class="post hentry uncustomized-post-template"> <a name="8829400899632947948"/> <div class="post-body entry-content"> <div id="8829400899632947948"> <div class="separator"> <a imageanchor="1" href="/images/outta.png"> <img src="/images/outta.png"/></a></div></div> <div style="clear: both;"/> </div> <div class="post-footer"> </div></div></div></div> I'm using jQuery and Colorbox. The first two DIVs are posts containers. I need to group the IMGs in each <div class="post hentry uncustomized-post-template"> using the REL attribute, like: 1 - Post 1.1 - IMG - REL="group0" 1.2 - IMG - REL="group0" 1.3 - IMG - REL="group0" 1.4 - IMG - REL="group0" 2 - Post 2.1 - IMG - REL="group1" 3 - Post 3.1 - IMG - REL="group2" 3.2 - IMG - REL="group2" I've tryied HAS, PARENT > CHILDREN and CHILDREN() from jQuery and REL: from Colorbox, but it seems I'm lacking somewhere in logic. Could someone help me?

    Read the article

  • Making JQuery LightBox Plugin work with multiple galleries

    - by lpdahito
    Hi guys... I'm trying to make this jquery plugin = http://leandrovieira.com/projects/jquery/lightbox/ work with multiple galleries on the same page. The problem is, everytime I click on a picture from a certain gallery, I get all the pictures from all the galleries on the same page. Let's say i've got 2 galleries of 6 photos each. If I click on a pic from gallery 1, I will see the pics from gallery 2 as well. I've tried something like this to make it work but no success: <script type="text/javascript"> $(function(){ $('div.gallery-6').each(function() { $(this).find('a.lightbox').lightBox(); }); }); </script> Unfortunately, it doesn't work!!! What's the workaround for that? Once again, what I'm trying to accomplish is to be able to view the pictures in their proper gallery. I don't want all the pics to be treated as one gallery. Thanks for your help guys. LP

    Read the article

  • jQuery attribute question

    - by Nick Simone
    I'm trying to select a series of divs one at a time. I'm sure theres a better way to do this, but I gave them all unique rels and I'm using the rels to select them one at a time. I want to move them over the width of the div, then animate it dropping down the screen. What I have is: $(document).ready(function(){ var totalbricks = 7; var index = 2; $(".brick").animate({top:"600px"}); while(index < totalbricks) { var postion = 45*index; $(".brick[rel='+index+']").css('left', postion+'px'); $(".brick[rel='+index+']").animate({top:"600px"}); index++; } }); All the divs are in a container div. Jquery docs say, 'Variables can be used using the following syntax: [name='" +MyVar+ "']' What am I doing wrong? Here is the HTML that is being used by the jQuery <body> <div id="container"> <div id="canvas"> <div class="brick" rel="1"> </div> <div class="brick" rel="2"> </div> <div class="brick" rel="3"> </div> <div class="brick" rel="4"> </div> <div class="brick" rel="5"> </div> <div class="brick" rel="6"> </div> <div class="brick" rel="7"> </div> </div> </div> </body>

    Read the article

  • JQuery val() does not work for textarea in Opera

    - by Anil Soman
    I am displaying a modal dialog using jQuery. This dialog has a textarea control on it. But on submitting this dialog, the value of this textarea is not recognized by jQyery for some reason. It always comes blank. This works perfectly in other browsers. I put alert to display the value but it looks blank. Can anybody help me in this regards? Controls <input type="text" id="txtGroupName"/> <textarea rows="3" cols="30" id="txtDescription"></textarea> jQuery code which used this value var postData = new Object(); postData.GroupName = $('#txtGroupName').val(); postData.Description = $('#txtDescription').val(); $('#txtDescription').val() comes blank but $('#txtGroupName').val() is read correctly as it is a input field. One more finding about this issue: When I put alert in my update function after populating the control value on page load, this alert displays the existing value properly. But it displays only existing value. It does not display the edited value after submitting the modal box.

    Read the article

  • how to get jquery.couch.app.js to work with IE8

    - by fuzzy lollipop
    I have tested this on Windows XP SP3 and Windows 7 Ultimate in IE7 and IE8 (in all compatiblity modes) and it fails the same way on both. I am running the latest HEAD from the the couchapp repository. This works fine on my OSX 10.6.3 development machine. I have tested with Chrome 4.1.249.1064 (45376) and Firefox 3.6 and they both work fine. As do the Safari 4 and Firefox 3.6 on OSX 10.6.3 Here is the error message Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: Wed, 28 Apr 2010 03:32:55 UTC Message: Object doesn't support this property or method Line: 159 Char: 7 Code: 0 URI: http://192.168.0.105:5984/test/_design/test/vendor/couchapp/jquery.couch.app.js and here is the "offending" bit of code, which works on Chrome, Firefox and Safari just fine. If says the failure is on the like that qs.forEach() from the file jquery.couch.app.js 157 var qs = document.location.search.replace(/^\?/,'').split('&'); 158 var q = {}; 159 qs.forEach(function(param) { 160 var ps = param.split('='); 161 var k = decodeURIComponent(ps[0]); 162 var v = decodeURIComponent(ps[1]); 163 if (["startkey", "endkey", "key"].indexOf(k) != -1) { 164 q[k] = JSON.parse(v); 165 } else { 166 q[k] = v; 167 } 168 });

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >