What is the use of colons in this examples
I have noticed the usages of colons in jquery for instance config: { duration: 400, easing: 'swing', callback: undefined, durationMode: 'each', offsetTop: 0, offsetLeft: 0 }, and $('#table').animate({ scrollTop: $('#table').scrollTop() + 100 }); I have seen colons being used in javascript like var o = { r: 'some value', t: 'some other value' }; What do the colon in jquery mean?.
Moving the scrolling bar down by some pixels without using any plugin
I am having trouble understanding how scrolling bars are manipulated in jquery.I have this table for instance http://jsfiddle.net/thiswolf/FnjvS/1/ and i would like to know how i would move the scrolling bar in the example down by some pixels say,100 pixels. This is my html <div id="sc" class="container"> <div class="tableholder"> <table id="table" border="1"> <thead> <tr> <th>id</th> <th>firstname</th> <th>lastname</th> <th>country</th> <th>city</th> <th>town</th> <th>gender</th> </tr> </thead>
get browser language with jquery
something in jquery for do that bellow? anyway i dont know this js not working :( thanks. var lang = (navigator.language || navigator.systemLanguage || navigator.userLanguage || 'en').substr(0, 2).toLowerCase(); if (lang == 'es') { console.log('espanish'); } else if (lang == 'pt-BR') { console.log('brasil'); } else { console.log('Common English text'); }
onclick change the value of the text box
Hi guys; I use the code below to add or subtract the value of the text box of number of nights in this link: http://www.hotels2go.com.au/gallery_nd2.php?order=3&search_term=Gold+Coast&search_type=destination&search_id=18&id=53&altFormat=2013-05-03&checkin_term=3+May%2C+2013&nights=1&nights=1&nights=1&room_type=12&room_type_view=1+bedroom+apartment This is my code and it doesnt work. It does call the funciton properly but doesnt update! Any ideas? Thank you $(document).ready(function() {
Wordpress and jQuery not hover but click menu
I need some help, because im stuck at the moment. I want a wordpress menu, where the submenu is activating by click on a main menu point. The submenu should stay visible as long as i am in that submenu. I found kind of solution here: http://jsfiddle.net/snoffoz/4rZa9/1/ I would need that in horizontal and not in vertical, but im totally stuck. Thanks for help. Mike
How to get the header dynamically using jquery ?
Hi , i'm trying to get the header dynamically using jquery .I tried and its working fine but some problem is there i dont know where i did the mistake. Its working like when i click on the link i'm not getting heading in header tag but when i came back and open the same link its shows the header.Like this it is working.. can anyone help me to get the solution. My code is here check this:http://jsfiddle.net/SP6ww/2/
TypeError: $(…).data(…) is undefined when trying to use first selection result
I'm using autocomplete plugin to select university from an external json list. Now, it will be such that once student selects university, later he will need to choose his faculty. For instance, Columbia University: communityid = 11 : parentID = 0 Architecture, Planning & Preservation: communityid = 14 : parentid = 11 I dont understand why I am getting `TypeError: $(...).data(...) is undefined` error. HTML <form action="content/signup/index.cs.asp?Process=AddMember" method="post" class="signup-form">
Returning from pdf resets the ui.
I used jquery to make an accordion/outline list of links to a bunch of pdf files. The top level is the letters of the alphabet and the second level the links to the pdf's. Clicking a letter expands into the links to files that start with that letter, typically 5-15 of them. That works great, with hide and show, using durations. But when the user hits the browser back function to return from the pdf, the accordion list is collapsed, as it is when you start the whole page; the top level item that was
Slide down after a set time but when share button is clicked also slide up and down
Ok im new here, and new to jquery but i have done the following code, which is soposed to side down a div 5 seconds after the page has loaded and also when you click another div it slideds up and down. It slides down fine but when you come to click the "share" div to slide it up the first click doesn't register after that it works fine. Im sure it something completely stupid i have done. Help most appreciated thanks. <script> $(function(){ var socDrop = function () { $('.socialS').addClass('active');
expanding on jQuery
I'd like to show you all my http://fancywebapps.com framework, which builds on jQuery and jQuery UI. It is free for non-profit use, and completely opensourced. I want to thank the jQuery team for their efforts. You've made my work-life a lot easier :) Moderators, if this message is not allowed here then just delete it.
how can I close down a browser on a click on a link?
Hi after a user click log out I want to add a link for the user "Click Here To Close Your Browser." I have done the following <script> $(document).ready(function() { $('a#closeBrowser').click(function(){ window.close(); }); }); </script> <a href="#" id="closeBrowser">Click Here To Close Your Browser.</a> this is not working for me. How can I get this to work?
i want to "include" a page when i select "jQuery UI radio button".
How to get radiobutton variable into php ? <div id="radioset"> <input type="radio" id="radio1" name="radio"><label for="radio1">Choice 1</label> <input type="radio" id="radio2" name="radio" checked="checked"><label for="radio2">Choice 2</label> <input type="radio" id="radio3" name="radio"><label for="radio3">Choice 3</label> </div> <?php // if (radio == Choice 1){ // include ("file1.php"); // } // elseif (radio == Choice 2){ // include ("file2.php");
JQuery $.ajax referesh and get new data
I am using JQuery 1.7.2. I am using highchart for making live data chart. I maked one C# page where on the page load I am writing some jSON format data which I am using in another page with the help ajax call for highcharts. I will run that ajax call inside function and in success event of ajax call I will make setTimeout after 1 minute to call again function, So I will get latest data every time. Until here everything works very good. But I have issue lets say data I am getting data only for 4 hr
How to open a file in the child tag of a xml file using Jquery ?
Hi Everyone, I'm trying to open a file in the child tag of a xml file.I'm getting all the parent tags in listview and when i click on parent link i'm getting child tags but when i'm clicking on the child tag. how to open a file in the child tag. see this:http://jsfiddle.net/Hs38x/3/ In this link have a "xml file" with child tags as <content file="93828.txt" order="1">Balmy with rich perfumes</content> <content file="93829.txt" order="2">Wear a fine dress</content> like this for every parent
Function within for loop
http://jsfiddle.net/xNquz/12/ I'm trying to pass variables to the function using a loop, but I think the problem may be about closures? Apparently it's seeing the last variable in the for loop. Either way it doesn't work how I want. So what can I do to fix this?
how make a slide movement to a draggable div?
Hi friends, can someone help me to modify this script: http://jsbin.com/uhaxur/34/edit it's work 100% but when i drag i would a slide or elastic movement just like this script: http://stereobit.github.io/dragend/ hope in your precious help. Thanks a lot :)
Prevent horizontal checkboxes and radiobuttons from wrapping
How can a set of checboxes or radiobuttons inside a fieldset with data-type=horizontal be prevented from wrapping? I have tried adding the obvious CSS attributes to the fieldset but that did not work. Any ideas? TIA Silvio
We need Ajax, Jquery, Javascript HTML5 Experts immediately ?
Hi, Having one website with node.js and javascript I want to implement for mi site something : I have video conference with flash now I want to change that to mi video conference to HTML5 video conference in the same way I have youtube video player with swf again i have to change that to video player with html5, in my chat users can add my video and play for all users like youtube. Thanks,
Changing title lengths on window size change
I am trying to change the video title lengths when the size of the window is below 1400 pixels (to prevent word wrapping with the long titles) but for some reason it appends all the featured links TWICE and doesn't correctly erase the entire DIV to regenerate when the window size is changed. http://jordan.rave5.com/tmpstuff/ Live preview of issue Here is the window size control: // Control Header Size & Youtube Player $(window).load(function() { resizeDiv(); appendFeaturedVideos(); $(window).resize(function()
Fetching Youtube jSON info and appending to document
Hello! I was told I may find help here. I'm trying to fetch jSON info from Youtube on a videos, and then append them to the source but I'm having issues getting the JSON info into an array to use in my FOR loop where it goes over each video.... :\ This is what I'm attempting currently. // Get youtube info function parseresults(target) { var parseResults = $.getJSON(target); return parseResults; } function getComments(commentsURL, startIndex) { $.ajax({ url: commentsURL + '&start-index=' + startIndex,
Ajax PDF base64
Hello, As yall have probably surmised by now, I have no idea what Im talking about half the time. So here goes ... Im ...trying... to return a PDF stream from an ajax call. I have a stand alone program that runs the same code and produces a correct pdf ... Im trying to get it to display in the browser(chrome) . How do I tell the browser that the data in the response is base64 from the ajax call. I understand about the contexttype and all but it's displaying gibberish. Or crashing chrome. (like most
jquery location?
Still struggling with this, got the link to and nav-indicator to know where to go to but as soon as the DOM is finished the location is lost woodfellows.paston2.webfactional.com At a guess I need to pass the triggered location back to the setIndicatorPosition function although I cant even see where the position is being reset or lost. <script type="text/javascript"> 17 $(document).ready(function() { 18 $('#nav').append('<img src="/media/images/base/nav-indicator.png" id="nav-indicator"
How to make an extra cell in html using jquery
i have ajax/json method (web method) which binds html table in following way (let me share piece of code) for (var i = 0; i < data.d.length; i++) { $("#tbl").append("<tr><td>" + (data.d[i].id) + "</td><td>" + (data.d[i].name) + "</td><td>" + (data.d[i].age) + "</td></tr>"); where data.d[i].name is data return by webmethod ..up till here its working fine ..but i want to add new cell column for each row in href format i.e i need to have <a href=erum>erum</a> can any one know how to do this..
How to add submenu on mouseover
how to add submenu to hti menu here is the working code. http://jsfiddle.net/CFcVB/5/ thanks in advance
Wrong Letters getting peeked in password Textbox with windows phone
Hi.. I am using Miscrosoft MVC HTML password helper in windows phone 8 with jQuery validation as in following code snippets. <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> View: @Html.PasswordFor(m => m.Password) @Html.ValidationMessageFor(m => m.Password) But while typing, the wrong letter in the textbox is getting visible instead of currently
Using the resize event with modernizr.mq
I'm trying to activate a resize event on the following function: $(function() { if (Modernizr.mq('only screen and (min-width: 1140px)')) { $('div#ss1').html('<div>[snip]</div>'); $('div#ss1').append('<div><gcse:searchbox-only></gcse:searchbox-only></div>'); } if (Modernizr.mq('only screen and (max-width: 1139px)')) { $('div#ss2').html('<div>[snip]</div>'); $('div#ss2').append('<div><gcse:searchbox-only></gcse:searchbox-only></div>'); } }); I wanted to add a resize listener to it. Based on http://api.jquery.com/resize/
Java script job
Hello all of you I want one to do for me a job in java script Please reply thanks yzzoldan@gmail.com
scroll an indicator with target and highlight
url woodfellows.paston2.webfactional.com It seems that I can either get the indicator to work (albeit not scroll across to home initially) or get my method of having the current link highlighted but not both. Can anyone debug this or point me in the right direction or tell me 'you idiot you forgot this or this is wrong' please info: this line does the setting of noncurrent, zcurrent <a {% ifequal request_meta.PATH_INFO page.url %}class="slow-scroll zcurrent_link"{% else %}{% ifequal sp.url page.url
images in gallery not showing until page rezise!?
Hello, I have a jquery accordion with an image gallery insdie.... Looks like it loaded ok, but images don't show up (although the rotation started)... If I resize the page or minimize/maximize al images appear... this is a very strange behavior... I'm using latest jquery and UI version. Is there a way to trigger this by default? Thanks!
Changing HTML content using jQuery
I need to change this HTML: <div class="wp-pagenavi"> <ul> <li class="active"> <span>1</span> </li> <li> <a rel="start" data-ci-pagination-page="10" href="http://devserver/index.php/blog/page/10">2</a> </li> <li class="next"> <a rel="next" data-ci-pagination-page="10" href="http://devserver/index.php/blog/page/10">→</a></li> </ul> </div> To this one: <span class="current">1</span> <a href="#" class="page">2</a> <a href="#" class="page">3</a> <a href="#"
jQuery Regular Expression
So I wrote a custom method that restricts the username to specific alphanumeric characters and special characters. Everything works as intended except I want to make sure the username starts with a letter. Here is my code jQuery.validator.addMethod( "RestrictSpecialCharacters", function(value,element){ var hNum= /[^a-zA-Z0-9._]/; var inp=jQuery.trim(element.value).toLowerCase(); if(hNum.test(inp)) { return false;
Canvas auto wrap
Does jQuery had a power to make the HTML5 canvas auto wrap? I'm having a problem on computing on when to move the text on the new line. So I am thinking of other way to do this. I want the text on the canvas to act like what a normal text element do on its content. Thanks! . .
Validation not working IE8
http://www.aquariumbids.com/Account/Register.aspx jQuery validation is working in Firefox but not in IE8. I am using the following javascripts: jquery-1.9.1.js jquery-1.9.1.min.js jquery.validate.js Now again, this is working perfectly in Firefox. Let me know if anyone wants me to post my code here. You should be able to see everything you need since I supplied my development link above. Any help in this matter would be greatly appreciated. Thanks
rss
Hello, I am wondering why getJSOn url is not working? $(document).ready(function () { test = $.getJSON("http://rss.zoover.nl/accomodationfeed.ashx?id=172221", function(data) { console.log(test); }); }); If I put this url directley in my browser is is giving me a lot of info: http://rss.zoover.nl/accomodationfeed.ashx?id=172221 Can somebody point me in the correct direction?
Load Table 10 rows each on a button or any thing
Hi, I am populating an HTMLTable using C# code in my Asp.Net application. On products I am successfully showing all the products on a page. Problem is I want to show only 10 products, then after that a button would appear and clicking on it, it should show 10 more rows and so on ... Please guide me in this regard Usman Waheed
animate({left: -50%}, 'fast') Is this possible?
I'm trying to move a container out of sight by moving it 50% to the left. the container has a width of 50%. 50% is important because the site is flexible. example: <div id="cont" style="overflow:hidden; white-space:nowrap; width:100%"> <div id="cell_cont" style="display:inline-block; width: 50%"> <div id="cell" style="white-space:nowrap">something meaningful</div> <div id="cell" style="white-space:nowrap">something meaningful</div> <div id="cell" style="white-space:nowrap">something meaningful</div>
jquery.selectbox-0.5_style_2.js and javascript function issue
I am using - jquery.selectbox-0.5_style_2.js, to style my combo boxes. when i load this like this <script type="text/javascript"> $(document).ready(function() { $('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" }); $('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" }); }); </script> I am getting the style properly. There is no problem on that. But javascript functions are not working on those comboxes. Example <script type="text/javascript">
jQuery on and off for module instance
Hello, Firstly I want to apologize for my poor English. I'm facing a problem. I have a Single page application build with modules (With RequireJS). I can have more instances of the same module in the page at the same time. I try to manage events handlers for the module instance but I'm unable to use $.on and $.off for the current instance of my module. Please find follow code to demonstrate my issue define([ "jQuery" ], function($) { /** * Constructor */ function myModule(){
Jquery find Char length and set width based on it
Hey, I'm having a problem getting this to work: $('#itemListLeading table tr :nth-child(2)').each(function(){ $length = $(this).children().text().length; console.log($length); }): I want to find each of the 2nd table data's character length and eventually assign a width based on the largest one, but I seem to be getting errors with the first line and I don't know why. I have tested it without the each function and I'm able to return the full length of all the table datas but I want to be able
Using Ajax To POST Something
hi , this is my first time to asking a question in this website . i have an ajax post method Like the below code $.ajax({type:"POST",url:"functions.php",data:{"Showdata":"showdatatouser"},success:function(data){ $('#datagridview').html(data); }}); as you can see im just posting somthing to functions.php into the functions.php we have couple lines of code , that's return for me a Table content with couple Links in the top of that Table . after that i just defined an event for that links at the top
Next Page