I am looking to build a single page with 1000+ pages, dynamically generated from a database. One row in the db = 1 page.
I'd like the navigation to load a different, initially hidden with jQuery, and I believe I'll be ok doing so, however I'm also hoping for each individual post/div to be accessible with a direct URL, for example site.com/page.php?page=1
Is there a way to make the url change onclick, along with the div? This way, if I had a facebook share button, it would actually share a specific post, and not just the same static page.
Thanks!
You can use the jQuery plugin BBQ http://benalman.com/projects/jquery-bbq-plugin/
Related
Here is the problem, I have a WP site that changes the display depending on the presence or not of a parameter in the URL.
If no parameter the whole post shows normally.
If the user has the parameter in the URL the post will be split into many sections (break lines are used as separators) and each time he clicks next the page will load and the URL will change to "/2" for the second element of the post for example. This is what I have for the moment and it works.
With parameter in the URL I want the users to have a slide that only loads the content without the page loading but I can't find a way to do this in WP.
Is it possible with jQuery? For example, load all the content first and show the appropriate section after each click? How would you go about it?
I'm not asking for a code but the logic that you'll use to tackle this issue if you were in my shoes.
Thank you in advance for your suggestions.
trying to figure out how to best display a bunch of information on a "mother" page.
When I enter the first page, which is populated based on a GET method for a specific "id". on this page, I want to have an area where the user can click on either a link or button or other which will display a subsection in a single location. These pages will need to display the appropriate information based on data located on the page.
Would the best way just to be to create an iframe?
I'm unclear, as to how I best get this information to change appropriately (i'm still quite new to this process).
would I continue to use the GET method still on the "child" page; Do I also need to use a POST method somewhere?
any guidance would be great.
The better approach is to use ajax to populate that div.
i'm having a shop system which is displaying articles using a jquery slider plugin, so there's pagination.
i'm having an item with record id 123 on "page" 3 - that item has a unique modrewrite url like www.domain.com/myitem-123.html
the problem: when displaying the article details i need to somehow store the current page of the slider plugin in order to jump back to the last page of the slider.
i wouldn't like to modify my modrewrite url as it wouldn't be unique anymore (there would be different urls for same item) - the only idea i'm having is using a php session, but i'd need to set it via ajax command on each click which doesn't seem very elegant to me ..
any suggestions?
I believe a better and easier approach is to simply store that page number in a cookie and retrieve it on the slider/listing page.
But if you want to get on with your idea and need an improvement, I'd suggest to store the page number in a global variable in JavaScript and only make that request to the server right before the user jumps to the product's page ( you actually have to do it synchronously since the user is closing the page and the request can't "sit" in the background )
window.onbeforeunload = function() {
// do your server request here to store the $_SESSION['slider_page_no']
}
thanks for coming in and looking at my question.
I have a page that has a bunch of dynamic a tags with ids like aTag1, aTag2 ans so on.
now I need to make these tags open the same lightbox that initially loads a partial page named register.php,
and the user will fill out the form, sumbit it then go to another partial page named payment.php and go on until the registration and payment are all settled.
this process needs to be done using ajax.
I think this should be relatively easy if appropriate ajax plugin is used.
Could you please advise any plugins and tips?
Thanks a bunch!
Check out jQuery and jQuery UI Dialogs. Of particular interest to you would be the modal form demo. If you definitely need to have the content loaded from separate URLs, you could put an iframe in the dialog or do something like this example.
I am currently building a website in codeigniter that is one page site, basically one the user comes to the page, they created with a main menu from that menu they choose which sections of the sites they would like to see, and clicks on the associated links...clicking on these links should display the content in their own accordian menu.
My question is I assume the easiest way to do this would be load the selected views in using jquery and ajax? If I am on the wrong lines what would be a better solution, also I can't find anything about loading in views using ajax, does any one have any advice?
Yes, you can easily load content with AJAX and jQuery, by binding click-events on your menus and links, like this:
$("a.menuitem").click(function () {
var link = $(this), url = link.attr("href");
$("#content_pane").load(url);
return false; // prevent default link-behavior
});
However, by going down this route you forego some key functionality in the browser. The Back-button won't work. Your users can't bookmark any of the subpages. There are workarounds (like this jquery history plugin), but it'll be a lot of work to replace functionality that comes natively with every users browser.