Search Results

Search found 2 results on 1 pages for 'user313835'.

Page 1/1 | 1 

  • jQuery toggle on a PHP foreach statement

    - by user313835
    The code for the page is the following <?php foreach ($organization->index() as $id=>$content) { ?> <a href="#" id="obtain_branch"><?= $content->name?></a> <div id="directory_brnach"><?= $content->about?></div> <?php } ?> The JavaScript code using jQuery is // Directory inner branches $('#obtain_branch').click(function(){ $('#directory_brnach').toggle('fast'); }); The problem it will only work on the first one given the the ID is not changing, the rest will not change. How can I send an array to the jQuery function to give an individual ID on every iteration? Thanks in advance.

    Read the article

  • retrive data from mysql using php and jquery

    - by user313835
    i have a menu, it contains multiple items, each menu item will retrieve data from the database. i want to do it without the page refresh, i want like an area that will change when the user clicks on the menu link. How should i send data to the php script and how should i get it from there and preview it on the page. if you can send me any information, references or examples that will be great Thanks in advance.

    Read the article

1