We have made some changes on our homepage and it all went fine until we clicked to get to the homepage... Which is somehow different. Example: http://www.testsite.net <- this one is fine with the jQuery and Javascript together.
Example: http://www.testsite.net/index.php <- this one doesn't work with jQuery and Javascript together.
I have no idea why it doesn't work only on index.php...
My question is, why doesn't this work? Is there something special I need to know?
Do you have any suggestions? A workaround maybe?
I can post some code but it's kind of a pain to do that because it's quite alot.
If you want some code, please state what kind of code you need...
Any more information needed? Feel free to ask.
Thanks in advance!
You need to search in jquery and javascript code if you find your static url "http://www.testsite.net" then you need to make dynamic with location.hostname
Related
Hi folks I am building a CRUD system very similar to this example http://jsfiddle.net/rniemeyer/WpnTU/.
Context:
I have several HTML pages that each contain the same table of data but showing different information (each page have their diffirent use).
On each row theres an edit button like yuo see in the example. Since the modal form is the same accross all the HTML pages I decided to create one HTML page containing the modal form. I then use jquerys load function like so $("#load_modal").load("pages/modal_form.html"); on each of the HTML pages.
Problem:
On a basic HTML page this is working out great. I tought this was a brilliant approach and gave myself a pat on the back. But now the problem I have is that when started implementing knockout it dosent seems to be working together very well. Modal dosent always pop up correctly and such.
My question:
At this point im not looking to figure out my code issue. I spent days and weeks staring at it and I came to the conclusion that I need to rethink my approach altogether. Im curios to hear some of your opnions on what would be the best aproach to tackle something like this.
Ideas so far:
I found this https://github.com/rniemeyer/knockout-amd-helpers/tree/master/examples But dosent use the latest knockout version and seems more complicated for something simple I need.
I also saw that using requireJS would be another idea but honestly these seem to complicate things for me.
Would anyone know of a simpler template solution or even have a whole different approach to this?
Using jQuery to modify your DOM is not going to work well in Knockout. You can use components to define the form HTML. Use an observable to switch which component is displayed.
I want to create a html site for troubleshooting problems, in which the user selects an answer to a question and then another question is loaded based on the answer, and then another question based on that answer and so on until they drill down to a solution.
I've looked around on here for something similar but all I've found so far is quite simple code that hides all divs then changes the display options based on which radio button is selected - with the number of questions I want to load I dont think this would be suitable...
I think the best way to do it would be to find a way to store all of the different questions in a separate file then use an onclick event to load the correct one depending on which radio button is selected... preferably using AJAX. Problem is I'm extremely rusty with my js/ajax and have no idea where to begin with this!
I realise it sounds like I'm asking practically asking someone to write it for me haha! but even if someone knows of any tutorials or can just point me in the right direction it would be greatly appreciated!
Try JQuery-Drilldown
A Demo and Instructions are in the Link below. Just look at the tags and the JavaScript
I've got an HTML/CSS website and want to add my latest tweet in the footer section, a few notes:
I don't like the look of the available twitter widgets on their website
I just want something that will show Only my latest tweet as text (just the last one, not several), then I'll go around adding a background and customize the fonts through CSS.
I'm still a beginner when it comes to web development, so don't have any experience with JQuery/javascripts, so if the solution is done by those I'd really appreciate it if you keep it simple and easy to understand.
I tried following this guide exactly as mentioned in the steps but it didn't work, simply nothing was shown:
http://www.webdesigndev.com/programming/how-to-display-your-last-tweet-using-javascript-and-the-twitter-api
Maybe it's an outdated method of doing such thing, I'm not really sure, I don't want this exact method to work, just anything to get the job done.
Any help would be really appreciated guys.
This might help you. Go into your editor and replace the "" from what the source code you copy is using and replace it with real "". On all 3 lines
Got it to work for me
Just add this to your website on the place you need it:
<div id=”twitter_update_list”>
<script type=”text/javascript” src=”http://twitter.com/javascripts/blogger.js”></script>
<script type=”text/javascript” src=”http://twitter.com/statuses/user_timeline/[yourusername].json?callback=twitterCallback2&count=1″></script>
</div>
new to jquery need help please!!... - I'm trying to create two carousels on the home page using the example below but doesn't seem to work.
I realise that the example is using ids, tried to change them to classes but didnt it do much.
http://www.dreamcss.com/2009/04/create-beautiful-jquery-sliders.html
Thanks
An important philosophy in jQuery is "Don't reinvent the wheel."
Just use a plugin for features like this, such as Easy Slider!
Here's a demo of more than one on a single page
Oh, and in the future, be sure to describe what doesn't work as well as your code if you want people to actually be able to help you with your specific problem.
I'm trying to create or atleast understand the technology used in the website of www.ziggo.nl. They implemented ajax on such a nifty way! If you click on 'Producten' the whole page loads (mind the link /#producten/), if you lick on 'Alles in 1', the hashlink changes to (/#/producten/alles-in-1/, but only the content of the page changes instead of the whole page. Even the backbutton works!
Does anyone of you guys know how I can make something like this? I came across ajaxy for jquery but I think it's not the thing I need.
Hope someone has some advice!
Regards,
Rogier
Check out JQuery Address. It does seem similar to ajaxy (hadn't seen that one before), but I'm not sure why it is "not the thing you need", as both seem to address the issue in your question.