I know this is not a completely new question, but none of the answers solved my problem...
I have built a little menu that uses load() to load image galleries (as external html files) into a specified div ("content"). The said galleries make use of a JQuery plugin (SlideJS).
Now I know that load() does not work for script tags and that I need to use $.getscript in the callback function in order to run the scripts, but it does not work. I have two .js files that need to be loaded: one is the plugin itself and another one is a smaller script with a preloader and the animations for the captions.
I can't seem to merge them together; if I put them into the same document, the script won't run. So I tried just using $.getscript to load the two files.
I tried using two callbacks as suggested in other answer (I know it's not ideal...):
$("#proposal").click(function(){
$(this).addClass('selected');
$("a:not(:#proposal)").removeClass('selected');
$("#content").load("works/proposal/proposal.html", function(){
$.getScript("js/slide.js", function (){
$.getScript("js/slidepage.js");
});
});
});
and I tried a variable (read about it in some other faq, not sure if the syntax is correct)
$("#proposal").click(function(){
$(this).addClass('selected');
$("a:not(:#proposal)").removeClass('selected');
$("#content").load("works/proposal/proposal.html", function(){
var scripts = ['js/slide.js','js/slidepage.js'];
$.getScript(scripts);
});
});
So none of these work. What am I doing wrong? I'm just starting on jquery and my js knowledge is very limited. Should I just merge the two .js files together using minify or something? One of them is already minified, but I've tried with a non-minified version and it does not work either.
Can anyone suggest any other solution around this problem? I thought of just having the div embedded in the main document and just showing it on click, but I'll have at least 4 galleries with about 8 to 10 images each... its a lot of images to load in the main page, so I don't think its the best way.
if you need me to post any more code, please ask! Thanks in advance for all your help!
Hi everybody,
Can you help me with some information, to make it faster ?
Can I use API feed from slideshare with JavaScript (jquery) ?
Here, http://www.slideshare.net/developers/documentation I see just "Response XML Format" don't see any Json Response.
Can somebody help me with that, some helpful links, or some suggestions, how can I use "Slideshare" API feeds with JavaScript.
Thanks A lot !!!!!
Hi,
I'm very new to JQuery, but I was told the one of the cool things about it is you can query a mysql database right from an html page(or in my case a smarty template)with out needing php.
I have not found any examples of this so I am asking if someone has one? Thanks
I have jquery datepicker code where i am dispalying one calander control to dispaly dateand time
$("input[id^='exc-flwup-<%=Model.ExceptionID%>']").datepicker({
duration: 0,
buttonImage: '/Content/images/calender.gif',
buttonImageOnly: true,
showOn:'button',
constrainInput: true,
showTime: true,
stepMinutes: 30,
stepHours: 1,
altTimeField: '',
time24h: true,
minDate: 0
});
Image button is allways coming left side of my textbox I need to keep it right side of my textbox
is there any way I can adjust my image on this?
thanks
is the jQuery function "change()" working in IE ?
I usually use it to detect changes in forms (select/unselect check boxes), and submit them automatically without having to click on submit button (which is hided).
i.e.
$("#views-exposed-form-Portfolio-page-1").change(function(){
$("#views-exposed-form-Portfolio-page-1").submit();
});
But in Ie it doesn't work. It seems I have to use "click" instead.
thanks
if one of the main benefits of jquery is cross browser javascript support, does that become less valuable as more browsers aim to become standards compliant and the same javascript works on all browsers?
I am trying to find the correct syntax to pass a varible to my JQuery Post.
var id = empid;
$.ajax({
type: "POST",
url: "../Webservices/EmployeeService.asmx/GetEmployeeOrders",
data: "{empid: empid}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(result) {
alert(result.d);
}
I don't think the data: value is quite right. Someone set me straight?
Thanks!
I'm using JQuery and jcarousel, using external navigation controls:
http://sorgalla.com/projects/jcarousel/examples/static_controls.html
The problem here is the navigation buttons no longer disable as shown here:
sorgalla.com/projects/jcarousel/examples/static_simple.html
Is there a callback I can use to allow me to swap the active image of a button with an inactive image?
I'm trying to duplicate the drag and reorder action of the icons on the iPhone screen. I did find one page here that offers some insight... but their demo doesn't even work. So the search continues.
I'm new at jQuery, but am getting there. If I could locate a demo of this solution I could work with it.
Hi,
I have a page with many panels. each panel will have around 5 textboxes.
I need to disable all the textboxes which are empty when the page is loaded. Want to acieve this using JQuery. Can somebody help me on this?
Hey Everyone,
Just ran into an odd issue. I have a simple WP loop and instead of regular NEXT/BACK pages, I use a jQuery powered $.ajax get to append the following page to the current page. It works perfectly. However, I choose to insert a Google Adsense unit every 5th story. Unfortunately, the Adsense unit that is brought in with a second, third, or etc page load don't render.
Here's my loop: 10 stories per page, Adsense after the 4th one.
<?php $count = 0; ?>
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php $count++; ?>
<div class="card">
<div class="title">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php the_title(); ?></span></a>
</div>
</div>
<?php if ($count == 4) : ?>
<div class="card">
<!-- ADSENSE CODE HERE (Straight from Google Adsense Panel, no tweaks.) -->
</div>
<?php endif; ?>
As for my jQuery script, here's how that looks:
$.ajax({
url: nextPageLink,
type: 'GET',
success: function(data) {
$(data).find('#reviews .card').appendTo('#reviews');
},
error: function(xhr, status, error) {
$('.loadination').addClass('hidden');
}
});
Keep in mind, I just simplified my code to give you guys an example. The code above was just the essentials. All the loading stuff works perfectly. Images, text, links, etc all load just fine. However, the Google Adsense unit doesn't.
Any help would be appreciated. Thanks and Happy Holidays!
amount
A. 2
B. 3
C. 3
Quantity
A. 4
B. 5
C. 2
Total
A. 6
B. 8
C. 5
sum(19)
i need some idea of script and method of jquery to make this simple i have already done the edit function of amount and Quantity. but its really hard for me to sum up the amount + quantity = total and sum(total). any idea guys? :(
I've created a jQuery slider on my site using the Nivo Slider whihc is available at http://nivo.dev7studios.com/ . I'd like to have the ability to add in the images + links via a form so that I may create a featured content area. Any help is appreciated.
hi my dear friends ...
How can I change the visibility of a control with jQuery? I have a control that its visible property to false...(not css)
When I used show() function for it nothing happened, it seems that hide() and show() methods are for css set of a control , not visible property...
Thanks for your answers,
Best regards
Hi ,
Am using this
jquery plugin]1
How to change the click mode to automatically run mode ,
Present scenario , When u click NEXt it show the next three image,
When u click BACK It shows the previous three images ,
I want to change this scenario to
Whe loads , the plugin should start running(image) , Also i need the NEXT and BCK button , When user click the back button , then it show show previous three image and run image toward back,
Is it possible in this ?
Thanks
What does jQuery do differently when you specify the datatype as html as opposed to text. I haven't seen a difference but there must be some subtleties I'm missing. If I wish to return a portion of an html page as a string does it matter which I use?
Hi
I have a comma separated string. I split that string and assigned it to elements var.
How can I loop that elements var?
$(document).ready(function(){
var element = $('#imageIds').val().split(",");
// how to loop this elements using jquery
});
{"paging": {"pageNum":2,"action":"Next","type":"","availableCacheName":"getAllFunds","selectedCacheName":"","showFrom":101,"showTo":200,"totalRec":289,"pageSize":100},
"Data":[{"sourceCodeId":0,"radio_fund":"individua
l","availableFunds":[],"fundId":288,"searchName":[],"fundName":"Asian Equity Fund A Class Income","srcFundGrpId":"PGI","firstElement":0,"las
tElement":0,"totalElements":0,"pageList":[],"standardExtract":true}]
I have json file with above format with two fileds,one paging and one is Data array.
I able to retrieve values of paging,but i am not able to retrieve the values of data array with .each function of jquery.
Any suggestions or inputs really appreciated.