You could simply wrap the php file in another php file that does
ob_start() then includes the other php file, ob_get_contents(), edit the
code appropriately and then dump it.
Would be my suggestion... Broken DOM leads to many problems, one of
which is jQuery wont be able to find selectors very well..
the closest thing i could think of jQuery wise, might work...
$('.select_chalet > .select_chalet').each(function() {
$(this).insertAfter($(this).parent());
});
That should take care of getting any select_chalet's back outside of
other select_chalet's
You'll still have a DOM issue at the end of the select_chalet list
though. Could be fixed similarly, if you have some method of
determining the DOM objects that shouldn't be inside a select_chalet
(i.e. '.select_chalet > TABLE' ) , you could just add it to the selector
above.
Maurice Kroon wrote:
Hi,
I've got a friend that bought a booking app a view months back. Now
there is something wrong with implementation, because every time a
particular (class="select_chalet") div is opened, it won't be closed.
So, instead of waiting for the fix & repair bill, i wanted to try
something else.
This is the code:
<!-- begin item -->
<div class="select_chalet">
<div class="select_chalet_content">
<div class="select_chalet_name">
<!-- name + info chalet -->
</div>
</div>
<div class='select_chalet_status_free'>Clean</div>
<!-- begin item -->
<div class="select_chalet">
<div class="select_chalet_content">
<div class="select_chalet_name">
<!-- name + info chalet -->
</div>
</div>
<div class='select_chalet_status_free'>Clean</div>
<!-- begin item -->
As you can see, the first div, isn't closed before the next item is
started..
I wonder if I can search for comments, and so, append the </div> after
the comment. Is that possible (and how?)?
Thanks a lot guys, I really appreciate it..
Regards,
Maurice Kroon
ps: for the guys that will ask why I just won't change the php code >
it's encrypted.. So the booking app firm must do it..