Hide string of text followed by random number
Hi! I'm trying to hide a string starting with text 'Ref:". I know various ways of targeting specific text but this one is followed by a 6 digit random number. I can't figure out how to include the number since it is ever changing. Although it can be in a different order, this is how it usually appears in the markup: <small>(Delivery Options: Standard Shipping - $11.95, Delivery Date: 01/31/2014, Ref: 404927)</small> How would I hide "Ref: randomnumber"...? Thanks so much! Susan
about active functions and and mask's in a input
hi guys, i really need a help here.... i have this kind of function in a loop waiting for a button beem hit: $("#Worker").append('<input class="money" type="text" id="Workmoney'+i+'" name="Workmoney'+i+'" /> its work like a charm, but now i need some mask for work with this appended.... sow, in the jquery document ready i put this line: $(".money").maskMoney({showSymbol:true, symbol:"R$", decimal:",", thousands:"."}); when i hit the button the script create all the appends i need... but he not
cannot access variable in another javascript
Hi, i have code like this http://dpaste.com/1568412/ i want to access var ok in another javascript, and it's not work when i alert(ok); ? thanks :)
Sorting an array of objects by multiple properties
Hello, I have a bunch of <article> elements on a page, some that have "data-order" attributes with values like "1", "6", etc. and some that don't. I need to be able to move the <article> elements with this "data-order" attribute so that they appear in the order that's set in the attributes. For example one of the article elements has this <article data-order="2">. That element in this example currently that appears right at the end all the other <articles>. What I want to do is move <article data-order="2">
.each function exiting early
To start out I have a form which which at the time we could only access radiobutton or checkbox groups by name. Yesterday I figured out how to add id's to these and now my .each loops exit after the first loop. This is puzzling and I wish i could show you code of what I did but I am honestly not sure what to show you. I would like to ask what would be the possible reasons for a loop exiting early just because I changed from accessing the groups by names to ids. Any help offered would be greatly
I canot set the width
I am having an element html <a class="icon-right"></a> css *{ border-sizing:border-box; } a.icon-right{ display:inline-block; height:90%; vertical-align:middle; } jquery var $iconH = $('.icon-right').height(); $('.icon-right').width( $iconH ); // test to see --> $('.test').text($iconH); I get <span class="test">90</span> If I look into Chrome webdev tools I get the final values --> .icon-right w=92px h=66px with test.text I get 90 and the width = 66 ! what can be wrong in my code ? thanks for
jquery ajax parse error in ie
Hi, I am getting this error in ie. But it works fine in firefox and chrome. I am pasting the jquery I used. Any idea why this is failing? var url = "http://urltocheck"; $.support.cors = true; url = url + "?ref=jquery-jsonp-request&callback=?"; $.ajax({ crossDomain:true, type: 'GET', url: url, cache:false,
Accordian jquery works as it should in all browsers except Safari (PC and Mac), help...
If you look at this page http://signsplus.printingstorefrontsolutions.com/page/vinyl-banners in any browser but Safari, and click the menus across the top in this order, Vinyl Banners, Mesh Banners, then Yard signs, you will see that the accordion menus on the left turn red, get red down arrows, and the ul list items become visible as they should (Mesh Banners has no list items). If you look at the same page in Safari (PC or Mac), click the menus across the top in the same order, Vinyl Banners
Having troubles with cloned fields
Hi, how are you? It's my first time in the forum and my english is not very good, so I'll try to explain myself good hehe. I've this code: var i = $('.detalle fieldset').size() + 0; $("a#add").click(function(){ $('<fieldset class="articulos" id="'+ i +'"><input name="articulo[' + i + '][nombre]" id="art_nombre" value="" /><input name="articulo[' + i + '][cantidad]" class="art_cantidad" value="" /><input name="articulo[' + i + '][preciou]" class="art_preciou" value="" /><input name="articulo['
Tabs won't work in IE8 with Compatibility View on
I have an aspx page that is using the jQuery tabs control that has 4 tabs. There are DIVs that should be hidden depending on which tab is currently selected. This functionality works in Firefox, Chrome and IE8 with Compatibility View turned off. However, when I turn on Compatibility View for the site, all of the DIVs below are displayed regardless of the tab that is displayed.
Animate Div To Jump In Front Of Page Content
Hi, I find that the people I work with are easily discouraged from using a webpage if there's lots of links, and there's a lot of linking data for the job. I've got a drop-down menu for categorizing. My goal is to to click a drop-down menu item and a div containing the content slides/animates/pops up (while the rest stay invisible). Like ads but actually useful ;) The div would contain a table with links, nothing special. So far all I can find is codes that float, slide, or animates the div left
Jquery touchmove event restrict to one axis
I have a mobile javascript/jquery app that uses touchmove through jquery for scrolling purposes. The entire page scrolls to show additional content when its swiped left and right. But when a menu item from the bottom is selected i need to freeze the page and just make the details pop up scrollable. I am doing that fine right now with the following. $("body").bind('touchmove', function (e) { e.preventDefault(); }); $('#detailsTextContainer').bind("touchmove", function (e) { e.stopPropagation(); });
"Check all" checkbox doesn't behave as expected if clicked before any other element
Hi I created the following JSFIDDLE: http://jsfiddle.net/s5Gzd The idea here is a table with different effects: * Even rows will be assigned a different style than the odd ones. * Hovering effect when placing the mouse over a row * Changing the color of a row when clicking on it or on the checkbox located on the first column. * "Check all" checkbox, which will select/deselect all rows and adjust its colors according to the state of this checkbox. Here I have only one problem: if the first thing you
selected radio button again
I using jquery-1.10.2 to select two radio button like blow,it is not work ,but using jquery-1.8.3.min.js is correct,who can help me how todo it,tks: <script> function testradio(radval) { $("input:radio[name='radisstop'][value='"+radval+"']").attr("checked",true); } </script> <input type="radio" name="radisstop" CHECKED value="1" id="isstop_0"><label for="isstop_0">running</label> <input type="radio" name="radisstop" value="2" id="isstop_1"><label for="isstop_1">stop</label> <input type="button"
Creating an accordian that slides up instead of down
I'm trying to create an accordion style information on my page. When I click on one of the titles it slides down which is correct but now I need one of those titles to slide up instead of down. Here is the code that I use to make the titles slide down. $(".additional-nav-info1").click(function(){ if($(".additional-nav-info-inner1").css("display") == "block"){ $(this).removeClass("active"); $(this).addClass("inactive"); $(".additional-nav-info-inner1").stop().slideToggle(250);
Lost overflow div
Hi..i have a div container(div1) and into this other div with overflow auto(div2)..when i execute slideUp and slidedown div1 and slidedown it... the div2 lost overflow..some issuse or what wrong?
Where is the data stored on the element?
Hey Guys. I am new to the .data() function and was just wondering where exactly does the data get stored on an element. I have the following code $("#store").click(function () { $("#div1").data("key1",1234); $("#div1").data("key2", "Joe Marini"); }); <div id="div1" data-key3="data attribute">Sample DIV</div> When I checked the DOM for the the div one tag, I couldn't find any keys and values and any of the attributes, just the data-key3 value. Also what is the difference between using the data()
datepicker is not getting the correct date
Hi, I am using the jquery datepicker. When trying to read the date from MySQL I am getting read.. at least that's what I am getting when checking the view.source but the value on the from end is not what I want. here is the code: <input type="text" id="dateClosingDate" name="dateClosingDate" value="<?php echo $closing_date; ?>" autocomplete="off" readonly required> and this is the jquery: $(function () { $("#dateClosingDate").datepicker({ dateFormat: "dd-mm-yy", numberOfMonths: 2,
How to create slide show using jquery
My code, display one by one images. i need slideshow : $house_image_link[] = "<li><img src=' ".JURI::Base()."components/com_realestatemanager/photos/".$house->image_link." '/></li>"; default.php : <div class="div_SlideShow" id="div_SlideShow"> <ul> <?php foreach($ongoing as $ongo):?> <?php echo $ongo;?> <?php endforeach;?> </ul> <div style="clear: both"></div> </div>
slideUp/slideDown problem
In this link, http://jsfiddle.net/8ws2H/1/, the panels work like they're supposed to. However when I copy the code to a new HTML page and save it, it doesn't work (nothing happens when clicking the panels). Including my code here, what have I done wrong since it won't work? <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"> </script> <script> $(".flip").click(function () { $(".panel").slideUp(); $(this).next().slideDown(); }); </script> <style
not selector is getting ignored
Hi, I want to hide my search field when the user clicks ANYWHERE but not on the search field itself and the icon which activates the search field. I tried it like this: $(function() { $('.top-searchField').hide(); $('.icon-close-searchField').hide(); }); $(document).ready(function() { $('#search-icon').click(function() { $('.top-searchField').show('slow'); $('.icon-top-searchField').hide('slow'); $('.icon-close-searchField').show('slow'); }); $('div').not('.top-searchField, #search-icon').click(function()
Cant change font-size on accordion hover
Hello, Im trying to change the font size when I hover over the links in an accordion. But I cant seem to get it to change. The below doesnt work. Im sure it's my selector. .ui-widget-content a:hover{ font-size:18px !important; }
Can I assign z-index to frames
Hello, i would like to assign a z-index to frames(I know, I know, but it's a clients code). I have 4 frames: top. left, right and bottom. Is it possible to assign a zindex to the top frame that would have a higher stack than the other frames? Im trying to mimic a "sticky header" type action. Can t get it to work ... #top{ position: absolute; top: 0px; left: 0px; height: 100px; width: 100%; z-index:10000;
Return value to a MVC model and set it to property
Hi, I am novice, so i will sound like that.. I am working on MVC ajax project. In this in model i have a property self.responseType. I need to fill it from db. I am ok getting array (two dimensional) from db to my datacontext .js file. So in my model i have below code self.responseType = ko.observableArray([]); datacontext.getDropdownValue(self.responseType, 8); Now getDropdownValue is the function in dataContext which fetch data from db based on value (here 8 as parameter) and set it to self.responseType
Animate with Change of CSS Class
A page I am working on has images that slide around to different positions on the page. When an image reaches a certain position I want to change its appearance by changing the CSS Class applied to it. When I run it (in Firefox) the animations work, but the Class changes do not. I have created a simplified version of my code, below. How do I get the Class changes to take effect? <!doctype html> <html> <head> <meta charset="utf-8"> <title>GT: Welcome Basics</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
I don't see a disable function
I see hide() and show(), I am using and they are cool. IS there a disable()? I want to disable a button.
transform img into backgtound img
how can do that with jquery to go from here <div class="boximg"><img class="bgimg" scr="any.jpg" /></div> to there <div class="boximg" style="background-image:url(any.jpg);"> <img class="bgimg" style="display:none;" src="any.jpg" /> </div> all the .boximg will find .bgimg > jpg to make a background-image thanks for your help
How do I create an object with methods
This may be more of a JavaScript question than a jQuery question, unless there is a better jQuery way to do it. I want to create an object that has methods. So I looked up how to do this on the internet, and got the following snippet: textplayer = new Object(); function textplayer() { function getDuration() { var retval; retval = 55; return (retval); } this.getDuration = getDuration; } then I should be able to call textplayer.getDuration(); It does not work, and neither to alternate
Load jquery.js async - possible?
I'm using http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js on my site. Is it possible to load it asynchronously? Like Google Analytics: (function() { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.setAttribute('async', 'true'); document.documentElement.firstChild.appendChild(ga); })(); I think the big difference between ga.js and jquery.js is that Google Analytics
Code works in Firefox and Chrome but not in jsfiddle or IE 11?
The code below works in chrome and firefox but not in jsfiddle or IE 11. I'm not understanding why and have been able to correct it. I have a table with checkboxes in a column and want to hide/toggle rows that are unchecked. I'm using localstorage so revisiting the page remembers. thanks for any suggestions. If I leave all checkboxes blank it closes all rows appropriately but check just one box and bam, it does nothing... I think it might be this line: if (arr1.indexOf(attrText2)==-1 && $(this).closest("img
Jquery script to logout from all opened tab if user click on logout on any page
Hi, I want script to log out from all opened tab if user click on log out on any opened tab using jquery and php. For this I am using following script but it's taking heavy resource of server as my site is on shared server: is_session_expired.php code: <?php session_start(); //echo $_SESSION['sess_memberid']; if(isset($_SESSION['sess_memberid'])){ echo "no"; }else{ "yes"; } ?> <script> function isSessionExpired(url,dopage){ //alert(url); var randval
jQuery - user can only resize web browser width until 1280px
Hi everyone, Please guide me how to create limitation for user that user can only resize web browser width until 1280p. Does anyone know about that? Thanks, Regards, Hellen
play/stop button for Slideshow
hi everyone i am new in jquery and the jquery code is: function slideShow() { var showing = $('#wrap .is-showing'); var next = showing.next().length ? showing.next() : showing.parent().children(':first'); showing.fadeOut(800, function () { next.fadeIn(800).addClass('is-showing'); }).removeClass('is-showing'); slideShow.timeout = setTimeout(slideShow, 5000); } slideShow.stop = function(){ clearTimeout(slideShow.timeout) } this code changes images every 5 seconds. i
Jquery Datetime picker
Hi , My Requirement is such that i have a table with two columns - DtDate , and Volume. I need to bind the the Jquery Calender Which is used as inline Calender in div tag . If for Date lets say 01/21/2014 Vol = 5 AND 01/22/2014 Vol = 10 AND 01/22/2014 VOL= 15 So i want to Highlight Dates , as per above Scenerio. Please Urgently , Let me know how to do this in the BeforeshowDay event of datepicker.
buttonset with REQUIRED
Hi, I am using the buttonset like this: <div id="RadioQ1"> <input type="radio" name="RadioQ1" id="RadioQ1Yes" style="width: 150px;"> <label for="RadioQ1Yes" style="width: 150px;">1</label> <br><br> <input type="radio" name="RadioQ1" id="RadioQ1No" style="width: 150px;"> <label for="RadioQ1No" style="width: 150px;">2</label> </div> with a submit button btnRegister I would like to ask how can I make the RadioQ1 required just like the input text's required? Thanks, Jassim
Scroll offset from one page to another
I am stuck in a bit of a peril. I have a scroll-to-anchor set up on "Page1" of a one-page website with easing.js using JavaScript. Below is my code: $(document).ready(function(){ $('a[href^="#"]').on('click',function (e) { e.preventDefault(); var target = this.hash, $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top - 120 }, 900, 'swing', function () { }); }); }); The links are so: <a href="#bodyContainer1">HOME</a> and the body container it is linked to is so:
Function if inArray, display text, else display other text....not working
Hello there! I have this html containing an input with name "product_id": <form method="post" class="form-horizontal" onsubmit="return check_add_to_cart(this, false) " enctype="multipart/form-data" id="productDetailsAddToCartForm"> <input type="hidden" name="action" value="add"> <input type="hidden" name="product_id" value="167"> <input type="hidden" name="variation_id" class="CartVariationId" value=""> <div class="ProductDetailsGrid ProductAddToCart"
text on hover
I am trying to write on mouseover <span id="left" data-original-title="Left"></span> <span id="return" data-original-title="Return"></span> <span id="rigth" data-original-title="Right"></span> <span id="hover"></span> on mouse over/out I want to write into #hover the data-original-title (and nothing on mouseout) the span can be a <a href="#"> if necessary how can I do it ? thank you
how to manipulate multi fields with jquery
i making a drug storage inventory im using jquery to search for items to insert its quantity , when i repeat every item fields and search for second item and choose it from list , it changes the previews item to the same one like the second one i choose . here is an example <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion
calling an array
Hello friends. I have tried to work below codes; How can the codes understand if a0's element is "b0", it calls b0 array. <script> a0=["a0","b0","a1"]; b0=["b0","a0","b1","c0"]; $(".drag").on("click",function(){ if($(this).attr("id")=="a0"){f=a0;}//I dont want to use jQuery.each( f, function( i, val ) { jQuery.each( f[f.lentgh+1], function( j, vals ) { }); }); }); </script> <div id="a0" class="drag"> <div id="b0" class="drag">
Next Page