declaring and running universal functions with iScroll & JQM
I'm trying to initiate the iScroll function as a universal function so that way, what ever element that has the class of .scroll, the element will be effected by the iscroll plugin. Here's the script that I use to declare the iScroll $(document).delegate('#home','pageload', function(){ var myScroll; myScroll=new IScroll('.scroll' , { scrollbars: true, mouseWheel: true, interactiveScrollbars: true}); }); Now this works the first time I load a page with that element, but when I try to load the second
Transitions - Fading [SOLVED]
Got this page that uses jquery to switch between pages: http://gmjones.org/pages/index.html# When I move between pages, the text 'rolls' down from the top. I want it to fade in. Here's the jquery code: <script type='text/javascript'> $(document).ready(function() { $('ul#navigation li').click(function(){ var number = $(this).index(); $('.sec').hide().eq(number).show('fade'); $(this).toggleClass('active inactive'); $('ul#navigation li').not(this).removeClass('active').addClass('inactive');
Does Jquery Mobile Load Entire Files to Each Client?
I am just looking at the file sizes of Jquery and Jquery Mobile both of them total around 450kb - so does each client load this "half Meg" on load of your webpage? or is the remote file called on functions incrementally? I am just wondering because of the speed and lag of mobile phones it might not even be all that practical to use..?
how to auto-format/structure single-line js?
Hello - I'm trying to peruse the script contents of a js lib. However, when I open the js script lib in VS2010 the script displays as 1 long line instead of displaying in a structured format. Is there a way to display a script like this in VS2010 in a structured format or is there another tool that will do this for me?
button click from AJAX called php file
I have a div that populates from pulling from another php file. The separate php file contains a table populating data. One of the columns in the table contains a button to delete that record. When I click the delete button on the page it does nothing. How do I make this button active to call my jquery function to delete the record that comes from another php file via AJAX? Thanks, ShoeGirl
The Hide mthod is not working in simple example
I am new to jquery and havin trouble with simple example; I am using the HIDE method to hide a DIV ID on click when i click the ID it hides what I want but only for 2 seconds then it reappears <script> $(document).ready(function() { $("#profiles").click(function() { $("#arty").hide(); }); }); </script> <a href="" id="profiles">Profile</a> <div id="arty"> @Html.Partial("_article") </div> This example works for 2 seconds only how can I make the
Attaching a change listener to a listview data-filter
I just started using JQM this week, and I want attach a input change listener to the data filter on a listview. I know there is a method to override the filter, but that is actually not what I am looking for. The filter is fine as it is. What I want to do is perform a search after the filter input hasn't change for ~1/2 second. I've implemented this in an ugly way by changing the filter so that it will search the data and return the results while preserving the filter functionality, but it's not
How to refer another javaScript file to some other javaScript file?
Hi, I have created a .js file where i want to use jQuery functions. But i am not sure how my js file can refer to the jQuery library. Is there any way to import the jQuery library to some other js file? Thanks
Flash of Un-styled Content using Malsup Cycle?
Hi I'm working on a website and using the cycle plug in to display manufacturers logos. The site also includes a carousel plugin on a different part of the page. My problem is that all the slideshow images appear for a second when the page is opened on an iPhone & iPad (works fine on PC & android). I've tried the suggestions on this website & malsup's faq and it doesn't fix the prooblem, the only way I get it to work correctly is to remove the Carousel script that succeeds it. I'm not sure how to
Onclick Accordion with 34gs grid
I try to make a webside with jQuery UI wit 34grid.com Sample Side ist here: test.utg-usedom.de If i click on the widget Accordion, the second grid is set on display:none; Somebody an idea, how i can fix it?
setting default date of one datepicker from another
I have an application that tracks projects. I am going to be using three datepickers to set the appropriate dates for starting, ending and reviewing projects and populate those to associated textboxes (#start,#end,#review). Currently all datepickers default to today's date. I want the first datepicker (start) to default to today's date, but then once the start date is selected I want the "end" and "review" datepickers default month and year to be influenced by the month and year selected in the
different behaviour of autocomplete widget on Windows 7 and Unbuntu
Hallo, I installed the autocomplete widget into a website. One important requirement to the website is that the user can use it only with the keyboard, without a mouse. In order to select an item of the widget's item list I navigate to the item by using the arrow keys and then pressing TAB (not ENTER). The TAB-press causes different behaviour depending on the used operating system. 1) Ubuntu 13.04 (running on a virtual-box-machine), Firefox 20: The selected item is displayed in the text field of
data-filter on li not formatting correctly question
I'm using the following to show results within a list search, but the formatting always seems to get ugly near the search field after searching. Anyone have any ideas on as to why its displaying like this? Any help would be greatly appreciated. <ul data-role="listview" data-filter="true" data-filter-reveal="true" data-filter-placeholder="Search for an extension..." data-inset="true" data-theme="a"> <!--Phone Extension List --> <li><a href="tel:+00000000000,100">User One - 100</a></li>
How to create a category wise listview dynamically using jquery?
i'm trying to get the category wise listview dynamically using jquery. I have xml file with all content in that file i have different category's. Html file: <div data-role="page" id="home"> <div data-role="header" data-theme="a" data-position="fixed"> <h1 id="title"></h1> </div> <div data-role="content" data-transition="slide" data-inset="true"> <ul class="list" id="section" data-role="listview" data-filter="true"> </ul> </div> </div> xml file: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
Include html files are not coming on load document first time
Hi, I have 50 static html page and I separate header footer and search as a include file. and I add this include file at another pages through javascrpit include method. but when I click (like about link)the link and the link going to this page(like about page), the content of about page is shown but the include's file like header and footer not coming with page load, but when I refresh the page(about page)the header and footer is coming. Note : 1. all the pages has transition effect's like slide,
hi friends Need a Jquery Validation for alphabet with minimum 5 letters?
hi friends Need a Jquery Validation for alphabet with minimum 5 letters?
Problem to insert a load() function to my code
Hi everibody !! I am using this code : $(function(){$('#content').find('article').hide().css({width:'0',marginLeft:'0%',left:'50%'}); var act='#page_1';$('#page_1').show();$('a').click(function(){page=$(this).attr('href'); if(page.substr(page.indexOf('#'),6)=='#page_'){ $('#menu a, footer a').parent().removeClass('active'); $(this).parent().addClass('active'); $(act).animate({width:'0',marginLeft:'0%',left:'50%'},600,'easeInCirc',function(){ $('#content').find('article').css({display:'none'}) $(page).css({display:'block'}).animate({width:'100%',marginLeft:'0%',left:'0%'},600,'easeOutCirc',function(){act=page;});});return
get JSON reading multidimensional JSON array in PHP
I'm using getJSON to retrieve information from a record and the corresponding detail records and display the detail records in a div id="questions". The PHP script that is called returns a JSON string (via json_encode) that looks like this: { "content": { "1": { "quadrant": "Balance", "text": "1. Meditative or prayerful activity today?", "answers": [ { "answer_id": "4", "text": "None",
Get all radio button values in page load
My code : <input type="radio" class="radioBtnClass" value="1" />1<br/> <input type="radio" class="radioBtnClass" value="2" />2<br/> <input type="radio" class="radioBtnClass" alue="3" />3<br/> $(document).ready(function(){ $('.radioBtnClass').each(function(){ alert($(this).val()); }); }); All alerts shows empty. How to get this all radio values in page load?Is it possible?
id for <p:calandar> input inside a datatable
I need to get the correct id of the input inside a datatable for masking. I have used inspect element to check the id. It shows "datatable_attributes:3:att_date_input". But the id seems not the correct one. If the calendar is outside of datatable, it works fine. Currently my calendar is inside a datatable. xhtml <script src="../../scripting.js"></script> <script type="text/javascript"> jQuery(function($){ $("#datatable_attributes:3:att_date_input").mask("99/99/9999");
ajax call chrome status text cancelled
Hi I am making a Ajax call to a URL when I debug in chrome it says status text cancelled? why would a request be cancelled? when I manually type the URL the browser, returns the expected value no problem every time. here is my ajax call? $.ajax({type: 'GET', url: "http://192.168.0.34:81/tenHsServer/tenHsServer.aspx", data: {t: "ab", f: "DeviceStatus", d: "C5"}, crossDomain: true, success: function(data) { alert(data); }, error: function (request, status,
Datepicker - DateRange
Hello, i ve installed Datepicker on my Page, and now i need a function for a DateRange. Where can i find this? i required: Field1: MinDay: 2010-01-01 MaxDay: Today -1 Day Field2: MinDay: MayDay from Field1 +1 Day MaxDay: Today I hope anyone can help thx regard
Issue when upgrading from jQuery version 1.4.4 to 1.8.0
Hi All, In my project there was a reference to jQuery version 1.4.4 which was working fine. Later because we need to use "on" function instead of earlier "live" method I changed the version to 1.8.0. Now, I am able to use "on" function but many of the UI alignment has been disordered. There seems no direct way to find out why this is happening. Can anyone give clue what may be the reason behind this problem. Thanks
targeting parents
you can use THIS if you want to target the object which the event was focused on ie $("#cat").click(function(){ $(this).fadeOut(1000); ]); is the same as $("#cat").click(function(){ $("#cat").fadeOut(1000); ]); is there a equivilant way to target the perent node of #cat?
How do I validate fields using the Blur event and the Submit event on the same form.
Hello everyone: I have a form I wish to validate and at this time decided not to use the validation plugin due to my needs and customization with ASP.NET. The idea is to have the form validate on Blur (as the user leaves a field) , but also use the submit event if for any reason a person decides to submit an incomplete form. Currently I have the blur event working and in addition to that, I also have an additional focus event and another blur event which provides more usability. In a nutshell here
Jquery and SWF
Hi, I have created a website for my company in which i need to put 2 .swf files. But it is not working in mobile. So, i tried changed it to a movie but of no use. Can anybody please let me know, whether i can embed the swf in jquery using JQuery SWF object plugin, or i can change to whole animation using jquery. Please reply as soon a as possible Thanks in advance Rekha
When Drag even is called on Draggable?
I need to know when 'exactly' drag event is called on draggable. After left, top properties of draggable are updated or before left,top properties are updated? Because when I read the left and top of a draggable it lacks 1px behind.
How 1-liner to alternate bg color on li but start over after each header?
I am trying to add a class to a div enclosed by li elements. Have to use a div inside the li to make the entire row colored and not just the li text. Here is my jquery 1.9 code: $(function(){$('a + h3 ~ li:even > div').addClass('bgcolor1')}); And here is the sample html layout: <ul> <a name="a"></a> <h3>A</h3> <li><div>blah blah blah</div></li> <li><div>blah blah blah</div></li> <li><div>blah blah blah</div></li> <a name="b"></a> <h3>B</h3> <li><div>blah blah blah</div></li> <a name="c"></a> <h3>C</h3>
Can I use user-defined attributes in the attr/prop method?
Hello, Can I assign a user-defined attribute to an anchor tag. Can I access this user-defined attribute using the .attr/.prop method?
fire event after opening page
Hello, I want to load a dynamic data when opening new page, but i cant get to the onload event... How can I call function immediately after loading a new page ? here is my code in each file Index.html : <!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body onload="alert('home page');"> <!-- Home --> <div data-role="page" id="page1"> <div data-theme="a" data-role="header"> <h3> testing </h3> </div> <div data-role="content"> <div class="ui-grid-a">
function wont work after use of append()
My script places all of the JQuery inside $(document).ready(function() { }); as standard. Some of the pages Divs are static and some are created dynamically using the append function - this is my append code $('#data').append("<div id=\"stenchblossomchart\" class=\"chart\"></div>"); (note that in that example data is the ID of a static DIV element) the problem comes when i try to detect an event on div created by this append code - my code is as so $("someobject").click(function(){ alert("sam");
Text jumping with javascript
Hello Javascript-expert, I want to do a program based on javascript online (Browser) for datasets of texts (PDF, Word, HTML). It should open those datas and enable text jumping. An example would be 3 words per second. The surrounding (imagines, background, text format) should be untouched. Here is a example for it. http://www.bestaltmed.at/imagines/imagin.php Can you please give me an idea, how I can accomplish that? Thanks a lot, Chris
get width of a select
I am trying to get width of the select box but not doing it write please advice me. here is my html <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns:wicket="http://wicket.apache.org/"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="stylesheet" href="chosen/chosen.css" /> <script src="jquery-1.7.min.js" type="text/javascript"></script> <script src="chosen/chosen.jquery.js" type="text/javascript"></script>
HTML5 MP3 Player
Hey guys, I was wondering if someone on here could help me out with a problem i'm facing. I am currently playing around with the audio.js html5 mp3 player, and everything is going great, except that when I have more than one player on a page, i'd like only one player to play at a time. I'm not sure if there is a good way to go about this in jquery. The mp3 are played via the same js engine file and are placed between <audio> tags in the html along with direct links to the audio files. Now would
Researchers say that over a third of iPhone apps still access a device’s unique identifier
Researchers say that over a third of iPhone apps still access a device’s unique identifier In 2011, Apple advised that iPhone and iPad apps should stop logging the unique identifiers of users’ devices, a practice that can be exploited to build up profiles for ad-targeting purposes. But a new study by researchers at the University of California, San Diego, suggests that many apps still do so. At the MobiSys conference in Taiwan this week, the researchers will present data gathered from 225,000 apps
How to style the dropped list in the trash bin while the draggable is a clone
I am developing a visual selector for compound library using the JQuery UI droppable photo manager demo as a basis. To prevent the original draggable from being deleted, I have set the draggable.helper class to "clone", and have modified the selectImage function's input to (ui.helper). The only problem for this modification is that the cloned list element is not placed in order (float to left) in my selection bin and can be stacked randomly depending on where you drop it. It is not the case
Google Map vs Collapsible list
I want to use google map and list on two different tab. The real example is Here. The problem is: if you load the map page "map.php" first, The map can display correctly, but the listview will collapse after you dismiss the dialog window (which is wrong). If you load the listview page "error.php" first, the listview will keep open after you dismiss the dialog window (which is correct). But the map.php can not be loaded correctly. I post the full code below. Thanks a lot for the help. -------------------------
Animated-menu.js trouble
Hi guys! I'm using the script animated-menu.js in my website, but i'm having some trouble. So, my website appears just fine in Google Chrome and Firefox, but not in Internet Explorer. My menu is positioned on the right side of the page and, as the Internet Explorer assumes that my page as a margin on the right (I have to scroll right to see that margin) my menu, when mouse rolls over, slides to the right instead of sliding to the left, as I wanted! I think I need a line in the code that tells the
How do I refresh a div using jquery and ajax?
Hello I need to know how to refresh only one div using jQuery and AJAX. Basically, here what I am doing. When a user log on the site using jQuery and AJAX I need to update the header by displaying "Welcome back, BLAH" also i can to change the buttons in the header to add "sign out and my account buttons!" it is very smiler to this web site when you log in the buttons in the header change! Note that i have the buttons and the name in a div and they all change via PHP and cookies but i need to to change
conflicting slider and pop up form
Hi, i have a page with a slider when i add the pop up form and its scripts to the page only the pop up form works and the slider stops working, i tried using the <script>jQuery.noConflict();</script> line after the javascripts that i think are conflicting because when i remove the "jquery-1.4.min.js" javascript the slider starts working but then the form doesn't work...but i am not sure if i have done it right..please if anybody can help i'd be really grateful this the code of my page <!DOCTYPE
Next Page