Trim unwanted div tag
Hi, I have a value which is of the format : <div class="ExternalClass{GUID}"><p>as</p></div> I want to retrieve the value "as" from it. How to achieve this in jquery? Thanks
jquery
i create one jquery but not proper output get. html: <table id="gvCustomers"> <tbody> <tr> <th style="width:150px;">Contact Name</th> <th style="width:150px;" scope="col">CustomerID</th> <th style="width:150px;" scope="col">City</th> <th style="width:150px;" scope="col">edit</th> </tr> script: $("#gvCustomers tr th").live("click", function () { alert("hi this is tested"); alert(this.text()); }); i want to get perticular header text when i click on header of table but in this only first
Why won't ".end()" work if used after ".first()" in a chain?
Hi, I have a simple bit of script. changeToCollapse.toggleClass('box box-default').toggleClass('slab-pane').addClass(active) .children('.slab-pane').toggleClass('box-collapse collapse slab-pane') .end().children('div').toggleClass('box-collapse collapse').attr('id', 'collapse-' + $this.attr('href').replace(/#/g, '')) .children().first().toggleClass('box-body') .end().end().children('header').toggleClass('box-heading')
Horizontal slide between two ul : different positions
Hi ! I'm trying to create a slide between two <ul> tags when I click on an image button. Click on the "image button" at the top right corner to see : http://jsfiddle.net/Xroad/CnSEa/3/ $('#content-clients').css('left', '150%'); $('#btn-clients').click(function () { $("#main ul:first").animate({ left: '-150%' }, 500, function () { $(this).css('left', '150%'); $(this).appendTo('#main'); }); $('#main ul:first').next().animate({ left: '0' }, 500); });
reading table values using jquery
As it is evident from below question, I am new to jquery. I have a table that is defined as : it has only 2 columns (but can have multiple rows) and I am trying to read the values using jquery. I can read the first column(drop-down list) fine. But the second column ( <input type="text" ) does not work. Any idea why? $('#studentTable > tbody > tr' ).each(function () { var $tds = $(this).find('td'); var $studName = $tds.eq(0).find('option:selected').val(); //works var $food = $tds.eq(1).val(); //doesn't
create array of objects
Hi all, I have a simple question , If I have this variable: var template={ range : "54" , matrix1 : { 'a' , 'b' , 'c' }, matrix2 : { 1 , 2 , 3 , 4 } }; and I have three options of it,such as: template1={ range : "32"
Creating multi-dimensional array and retrieving values from array
Hi, I have multiple elements retrieved from JSON method, which I want to add to a array and then retrieve the values from it. I am not sure, how to achieve that. My current code is as below: var srcs = []; var enumerator = this.pictures.getEnumerator(); while (enumerator.moveNext()) { var currentItem = enumerator.get_current(); var filename = currentItem.get_item('FileLeafRef'); var dir = currentItem.get_item('FileDirRef'); var caption1 = currentItem.get_item('ImgCaption1');
Jquery/Ajax question Ajax getting skipped.
I am teaching myself the basics of ajax. I have a good basic knowledge of JavaScript. I have a site that I use JavaScript like it was going out of style but would benefit greatly with the use of ajax. So I am playing around with ajax. In my exploration of ajax, I am building a very simple page which calls the body of a very simple aspx page. It works great, until I want to fire the ajax with a button click. the button will fire the event, but after it runs the jquery library - //ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
Setting overlay text on Image
Hi, I have a image library which has the following metadata. Header1,Header2,SubCaption, Url, Url text I want to show the metadata information on top of the image. Example Image below: I have used a third party plugin(basic slider - http://basicslider.com/), My current UI is as below: <script type="text/javascript" src="/Scripts/bjqs-1.3.js"></script> div id="banner-fade"> <ul class="bjqs"> <li><!-- Images --></li> </ul> </div> jQuery(document).ready(function($) {
Click to trigger complex animation
Hi I'm absolute new to JQuery and this forum. Also spare me at my bad English. What I'm trying to do is to get this skeleton character to walk when I click on the screen (or tap on IPAD). I could just finish a simple animation as a x-axis movement. Here's my code: $(document).ready(function() { $('#btn_right').click(function(){ $('#death').animate({ left:'500px' },'slow'); $('#shadow').animate({ left:'450px' },'slow'); }); }); I would appreciate much for your help
tracking
Hi I was able to create a site where I was able to count how many people scrolled to a section of the page. I've been looking but I don't seem to be able to figure out how to track how many people has left the site. Can someone help me with this? Here is the code that I have var hasScrolled = "blank"; $(window).scroll(function() { var y_scroll_pos = window.pageYOffset; if(isIE()<9 && isIE() != false){ var y_scroll_pos = document.body.scrollTop || document.documentElement.scrollTop;
Struggling to understand .each() looping
//CAPTURE THE 'MIDDLE' NUMBER FROM .attr("iid") INTO AN ARRAY. So get "33803' from the .attr("iid) into an array using .each and the object $(this). I guess i'm still missing something regarding this jquery 'looping' business. if someone could please get me past this hump I'd appreciate it. thanks -dave <table> <TR class=ms-itmhover id="wtf" iid="1112,33803,0" setEdgeBorder="true">wtw</TR> <TR class=ms-itmhover id="wtf" iid="1112,34443,0" setEdgeBorder="true">xxx</TR> <TR class=ms-itmhover
Add Images to LI tag dynamically
I have a div which contains a "li" tag. I have few images which I want to add the "li" tag programmatically. Below is the code I have used so far, but not sure how to add the image to li tags dynamically. <div id="div1"> <div id="div2"> <ul class="clsUL"> <li></li> </ul> </div> </div> pictureArray = new Array(); var pictureCount = 0; var enumerator = this.pictures.getEnumerator(); while(enumerator.moveNext()) { var currentItem
jQuery keyboard navigation : dysfunction with mouse
Hi I have a script for a keyboard navigation that partially works. When I'm on the home page (top of page) and I press the "down" key on my keyboard the page scroll fine to the next section. The problem is that if I scroll with my mouse in the middle of the page, or at the bottom of the page and I want to use the keyboard to get to the next section (on top or bottom) it doesn't work. In fact I have a counter system that lets you navigate between sections $ ('.layout') but this system shows its limits.
RadioButtonList enable disable TextBox
Hi all I want disable enable textbox with selected value of radiobuttonlist Markup <table> <tr> <td style="width: 15%;">Property Rights Appraised</td> <td style="width: 22%;"> <ww:wwWebRadioButtonList ID="rbtnPropertyRightsAppraised" AutoPostBack="true" runat="server" RepeatDirection="Horizontal" Width="100%"> <asp:ListItem Text="Fee Simple" Value="FeeSimple"></asp:ListItem>
animate the element's left property
Hi, I try to run this simple example, but I want div.silder to be hidden (it's left:-200px) then div.silder and div.content will slide right after click on .menu ul li a . why div.silder is above div.menu ? can you help me please Thanks
GET SELECT TAG VALUE HELP ME???
GET SELECT TAG VALUE and strore php varible <script> function showUser(str) { if (str == "") { document.getElementById("txtHint").innerHTML = ""; return; } if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // code for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status
Submit button is not working in Safari browser
Hello all. My first time here so not sure if this is the right spot for this question. I am an absolute noob to Jquery or any sort of programming so please bear with me. I have used this excellent jQuery Validation Plugin (http://jqueryvalidation.org/) on my site: http://bit.ly/YMA3zW It all works flawlessly on IE and FF, but in the Safari browser, when I click the Submit-button after filling out the form completely, nothing happens. It just sits there and no form submission takes place. I would
Galery Id within Slide id
Hello, I working in my new site, and i make a id within another id, the codes work perfectly, but toghether its not work. This is the site to see better the problem: http://heitorsam.com.br/novo_heitorsam/ In the final of site is the example the galery works. Code (problem of): <ul id="slider"> <li> <div id="galeria"> <ul id='galeria' class='kwicks kwicks-horizontal'> <li><a href="index.html"><img src="imagens/teste.jpg" alt="teste"></a></li>
write multiple text when i blur from an input
ok so i have several input tags, when i blur from one of the field it write text on the div 'blur!' the problem that is write the text once, how can i make it write 'blur!' each and every time that i'm blur from an input? that eventually it will write 3 time 'blur!'? http://jsfiddle.net/C9gvJ/
scrollTop() problems
I have a div that I have coded to scroll "automatically" using scrollTop. I am getting some weird results.... Every time I click the button the scrolling toggles back and forth.(please see the jsFiddle because I'm sure I am not explaining myself very well. If you can tell me what is happening, and not just how to fix it, I would appreciate it. I have it set like this : $(function () { var i = 0; $('#submit').click(function () { i++; if (i > 0) { $('#textOne').scrollTop($('#s3').offset().top);
.append() questions
Hi there, total jquery noob here. I'm having some trouble with the .append() method, though my problems might not be specific to this method. First off, I'm trying to append some text within <p> tags. It works fine with small strings, but when I try to do a very long string, and return it on the next line so I don't have to scroll way to the right to read it in my code, the "" are broken up. For instance: $("#btn1").click(function(){ $("#main").append("<p>Lorem ipsum dolor sit amet, consectetur
how to refresh one div without affectiong others
hi i would like to ask ?how to refresh or reload one div without affecting other div?
looked easy enough... selector for .attr("iid) not getting value
//why can't i make this happen I want to capture the numbers 1112,33803,0 <TR class=ms-itmhover id="wtf" iid="1112,33803,0" setEdgeBorder="true">wtw</TR> $(document).ready(function () { var fulu = $("TR").attr("iid"); alert(fulu); }); jsfiddle: http://jsfiddle.net/vhabhsrosed/3c5s3/ thanks for any insights. -Dave
scrollTop(), offset(), or ???
I have a div with a scrollbar. I have a bunch of spans and I would like to use scrollTop() or offset() to get my span to the top. I can get scrollTop( pixels ) to work, but I'm wondering if you can use an ID instead, or am I using the wrong function. <div id="textOne"> <span id="s1">I have a paragraph that is full of spans.</span> <span id="s2">I need to be able to put each span to the top on command.</span> <span id="s3">I don't want them to automatically line up on the left, only
json data to button function
Sorry, I'm sort of new to JSON, but I am somewhat familiar with jQuery. I've mainly only used jQuery to manipulate the DOM here and there, but nothing too advanced. I have a working piece of code that pulls data from a web method and puts it into a modal popup using bootstrap 3. What I'm trying to figure out is how to add a button and a function to that button to populate the textboxes on the page with the data when submitted. <script> $(document).ready(function () { // Add
Cant use a simple button
<a href="https://www.memo333.com"><button data-role="none">ENTRA A MI SITE!!</button></A> when I click the button and it works BUT....plz check the pic I attached, whats with that error? also...when I enter that page from my mobile, it ask me password...WHY?...how can i make that page public? it ask for the password of my wordpress domain, but I dont get it.
I have a code submit Form. Plz help me fix error
I have code index <script type="text/javascript"> $(document).ready(function() { $("#login").validate({ submitHandler: function(form){ var name = $('#name').attr('value'); $.ajax({ type: "POST", url: "test.php", data: "name="+name, success: function(){ $("#sao").load('test.php'); } }); } }); }); </script> <?php echo '<form action="test.php" method="post" id="login"><input type="text" id="name" /><input type="submit" id="submit" value="nhap" /></form>'; echo '<div id="sao"></div>'; ?>Code test.php
New to jquery, want to add effects n all using jquery in codeignitor ? Can ne 1 help me?
Starting from basic so can you please tell me how to do coding in codeignitor
help fixing the code for datepicker.
Have these two scripts, that work independently but not both in the same time.Please any help how to fix these or replace both. The idea is to disable sundays and the present date with the next two days date. thanks three day not selectable <script type="text/javascript"> $("document").ready(function () { if (!Modernizr.input.placeholder) { makePlaceholders(); } if (!Modernizr.inputtypes.date) { var $dates = $("input[type=date]"); $dates.each(function () { var thisDate = $(this); thisDate.datepicker({
put 2 jquery in 1 script
if i have jquery 1.1.11 and jquery.time, can i put its together in html form?
No data-transition if anchor href has parameter
Hello. I'm having problem with data-transition in jQuery mobile If I use this code without having "id" parameter in the href : $('#allList').append('<li><a href="#DeadlineDetail" data-transition = "flow" >'+ allDeadline.class +'<br>'+ allDeadline.duedate+' '+ allDeadline.duetime+'<br>'+ allDeadline.description +'</a></li>');The data-transition can work normally But if I add the "id" parameter to the href like this : $('#allList').append('<li><a href="?id='+allDeadline.id+'#DeadlineDetail" data-ajax
Como criar um slider jquery automático para qualquer resolução e com controles..
Saudações pessoal.. Preciso de ajuda pessoal em criar um slider em jquery automático e com controles,não tenho muito conhecimento em jquery,já olhei pela internet exemplos,mais são um pouco complexos,e o slider vai ocupar a width 100% do site. Na verdade eu modifiquei um slider CarouselLite,mais não consigo deixar ele com width 100%,gostaria que tivesse 4 imagens por vez e que cada imagem tivesse um link ao passar o mouse. Se alguém puder me ajudar,desde já agradeço.. Att, Alex..
when to use iteration?
$(document).ready(function() { $('div.chapter a').attr({ rel: 'external', title: $(this).text(); }, }); This code is wrong, because $(this).text() could not grab the correct content, but I do not know why. Jquery is implicit iteration, so the attr() method will run for each matched <a>. then why $(this).text() could not get the content of each <a>?
Form validation - won't hide DIV which contains two empy inputs
Hi all, Thanks to those who helped me out with using .submit() in my last post, this place is great when I get to the point of staring into the abyss thinking there's no solution in sight. I've spent the last 2 hours on another problem which I hope you can help with, probably very simple but reading the code, this should do what I want, but it doesn't. I have 10x rows of text inputs - each row contains 2x text inputs. I call each row a "pair" (pair of text inputs). I know I didn't need to use the
.submit() not working
Hi all, I'm hitting a roadblock in validating my form with PHP so have attempted to use jQuery which I understand... better. I hoped! .submit() doesn't run the script, nor does it prevent the form being submitted to the PHP. However, if I use .click in place of .submit, the script runs. I've bounced in and out of Google and people are saying wrap the function inside document.ready, which I have. They've also said make sure none of the name attributes are called "submit". They aren't... what now!!
validatio formular jquery
Hello, I'm starting to learn jquery and I want to validate a form with input and select. The problem is that I am getting n. What I did so far: $.each($('input,select', '#meu_form'), function(){ if($('input').val().length < 1) { $(this).addClass("error"); $(this).focus(); return; } if($('select').val()== "Mês") { $(this).addClass("error"); alert("Escolha invalida"); return; } });
jQuery Obsolescence Questions
I am an ILS Engineer working for CGI IT UK Limited. At the present time I am looking at software obsolescence issues that relate to the CGI project I am working on. On this project we use jQuery 1.5.2 and jQuery UI 1.8.11. In order to support our process of monitoring software obsolescence I would be grateful if you could provide me with the information with respect to these jQuery products: 1. End of Product Support date 2. Superseding Product for jQuery 1.5.2 and jQuery UI 1.8.11 if support for
Hi, im new! I cant opem my test html in my OWN domain...
I already stablished the test.html and the jquery mobile commands are working, js and css, BUT...when I upload them to my personal domain...I get Not FoundThe requested document was not found on this server. I used ftp to make the folder and upload everything and I cant access it with my mobile. plz help
resize detect within a resize detect?
kk. Here we go. It's foggy for me, so let me try to explain my issue. Bare with me, and more important: I need your awesomeness! Situation solved part: I have two different iframes from different locations with different proportional heights/widths which need to be responsive. unsolved: I want to let those iframes have a different size @ screenwidth < 480px. The working part (without the <480px detection) <script> $(function() { var $allVideos = $("iframe[src^='firsturl']"), $fluidEl
Next Page